Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. It's a mistake. Javascript does not require a semi-colon at the end of a line, but it is preferable to put one because you never know when your script might have it line breaks removed.
  2. Personally, I don't like to follow trends. I evaluate each technology and determine whether it fulfills my needs or not.
  3. A server-side language will be needed if you want to receive data from people filling out the form. Javascript would not be able to achieve it.
  4. I can only speak for myself, but my answer is: If the task you want to accomplish can be done in a browser, you probably don't need an app at all, PWA or otherwise. I notice a lot of companies trying to get users to download an app which is basically just an alternative way to navigate their website. If I was interested in building an app that works in the browser, I would not use PWA since I can build the app in native Javascript which allows more freedom and control over how the application is built. There is nothing that Google's PWA framework can do which cannot be done in native Java
  5. It sounds like you are importing some packages with another class named "String". You have to specify java.lang.String because you have imported a different String class and it assumes you meant that other one.
  6. I have not worked directly with it, but PHP has the IMAP extension to interact with mail servers. https://www.php.net/imap This page indicates how to open a connection: https://www.php.net/manual/en/function.imap-open.php This function returns message IDs for items in the inbox: https://www.php.net/manual/en/function.imap-search.php fetchbody() and other fetch functions will give you data about an email give its ID: https://www.php.net/manual/en/function.imap-fetchbody.php
  7. scroll-behavior is not a valid HTML attribute. If you want a link to scroll smoothly you can cancel the click event and use the scrollIntoView() method. Update You must be referring to the scroll-behavior CSS property: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior You need to put that in a CSS stylesheet, it is not HTML. It's also not properly supported by all major browsers.
  8. If you have a web host, they should provide the information to you. If you run the server yourself, you will have to create a user either through the command line or a GUI if it is available. How this is done depends on what SQL server software you're using.
  9. I am not sure you even read the question. You consistently provide incorrect or irrelevant answers to questions.
  10. Ingolme


    The "=" following the "button" tag name should not be there.
  11. An API is the only secure option. It's not exactly easy to implement, I don't think there are tutorials for it but you could search on google for PHP API tutorials. This is one of those things that are too specific to each situation to make a general tutorial out of it. Generally, information is sent to an API in JSON format. On your server's end, to read a JSON string sent through POST you could use file_get_contents('php://input') and then json_decode() it. $raw_data = file_get_contents('php://input'); $data = json_decode($raw_data, true); The JSON structure is entirely up t
  12. This is an example of loading a document from a string using DOMDocument: https://www.php.net/manual/en/domdocument.loadxml.php It looks like for SimpleXML, you can use simplexml_load_string(): https://www.php.net/manual/en/function.simplexml-load-string.php
  13. The correct way to solve this is to set up an API on your server. The client would connect to your API over HTTPS with authentication information (username, password and maybe an API token) exclusive to them along with the information they want to store. Your server would verify that the API request comes from a valid user and then it would store the information in the database.
  14. I usually use DOMDocument instead of SimpleXML, so I would have to read the documentation. I would look up SimpleXML on the manual at php.net to see if they have examples of loading documents from a string.
  15. That's probably the case. I can't say for sure. There's nothing with can do that can't be solved by simple dereferencing. I would have to question any source that says there is a good place to use it. The problem is that it can override variables and functions unintentionally. When you're reading code within a with block which was written by somebody else, it's impossible to know whether they intended to use an object property or some external variables.
  16. I guess DreamWeaver doesn't understand the heredoc syntax. Try to find a way to make it ignore the error and then run the code on a PHP server. I've never used DreamWeaver. For many years it a bad reputation because its preview tool was very wrong, so most developers steered clear of it. I assume by now they've fixed that, but since there are hundreds of free alternatives I don't have a reason to pay for it, especially now that it's a continuous subscription service instead of a one time purchase.
  17. The reason most tutorials don't teach it is because it is usually bad practice to use it. The "with" keyword takes the properties and methods of an object and treats them as variables inside the braces. For example: var obj = { x : 5, y : 10 }; with (obj) { alert(x + " , " + y); }
  18. What is on line 1? The heredoc isn't on line 1.
  19. Python is an alternative to PHP. PHP is actually not a great language, which is why most larger websites will use something different.
  20. You need to use prepared statements to prevent the data from messing up the query. You shouldn't put variables directly into an SQL string.
  21. You must have missed some of the code from the W3Schools example. Without seeing your code we have no way of knowing why it is not working.
  22. Try myName.equals("John"). The strings may be pointing to different spaces in memory.
  23. It depends on whether the website chose to accept numbers without leading zeroes or not. It seems that GoComics is prepared for both kinds of numbers so it is not a problem in this scenario.
  24. I don't think this is a CSS issue. The image file itself is horizontal. There might be an orientation flag embedded into the image file telling it which way is up which one of the browsers is ignoring. Try editing it in an image manipulation program and saving it again. The other possibility is that it is a CSS issue and there is some CSS rotating the element. I think this is less likely since such CSS would not work in IE7.
  25. It is probably that there is a quotation mark in the JSON contents.
  • Create New...