Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Ingolme last won the day on October 12

Ingolme had the most liked content!

Community Reputation

966 Excellent

About Ingolme

  • Rank
    Coding Fox

Previous Fields

  • Languages
    Java, PHP, MySQL, Javascript, CSS, HTML

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Gender
    Not Telling
  • Interests
    Web development, drawing, videogames, foxes.

Recent Profile Visitors

182,047 profile views
  1. Yes, there's nothing preventing you from using execCommand() in more than one place.
  2. If you need another condition, use else if(), if not then just use else. Neither of them are required, you just use them if you need them.
  3. This line is missing an "if" else ($choice == 'writsEdit')
  4. filter_var() with the FILTER_VALIDATE_INT filter returns an integer, not true, so === true will always fail. By using The ! operator, they transform it into a boolean. This boolean, for any integer other than zero, is always false. This solution doesn't account for the integer zero which converts to true, but W3Schools also has a section talking about that. They could just use !!filter_var() or (bool)filter_var() and they wouldn't need the === false part. This would still not solve the integer zero problem, though.
  5. That depends on where you want it to appear. The code you write does exactly what you tell it to do. I don't know what you want, so I can't tell you how to do it.
  6. That code is literally in the first post that he made. It would do to read more carefully before replying. This topic is really old as well, most likely the person will never see your reply.
  7. I can't see what the exercise actually was, but for learning purposes, the alias you use should not matter at all. Most likely it was the syntax that was incorrect.
  8. Firefox shows all of the event handlers that have been assigned to elements in the document. "Bubbling" indicates that the event fires during the bubbling phase, meaning that events from child elements fire before it. DOM2 just indicates which DOM standard is being used. As for what the Matomo code does when the page unloads, I don't know, there are too many external elements that determine that.
  9. I'm not concerned about the intention behind the code, I'm merely indicating which logic would be equivalent to the original code.
  10. The shortest equivalent code you can make without conditionals would look like this: $str_browser_language = ''; if(!empty($_GET['language'])) { $str_browser_language = $_GET['language']; } else if(!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $str_browser_language = strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ','); }
  11. No, they don't produce the same result because in your code you're skipping over some comparisons that have to be made. Regardless of whether $_SERVER['HTTP_ACCEPT_LANGUAGE'] was tested or not, you have to test $_GET['language'] in order for the statements to be equivalent.
  12. You need to understand how the conditional works. In the statement X = C ? A : B , X is either equal to A or equal to B based on whether C is true or not. In other words: if(C) X=A else X=B
  13. No, that is incorrect. Each line is its own set of conditions completely independent from the other line of code. It is equivalent to the following code: if(!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $str_browser_language = strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ','); } else { $str_browser_language = ''; } if(!empty($_GET['language'])) { $str_browser_language = $_GET['language']; } else { $str_browser_language = $str_browser_language; }
  14. It is not inside the user_stats menu item, it is in front of it, 40 pixels from the left and 0px from the top of the #iconscontainer element.
  15. Yes. You can use the PHP database libraries in any part of your program.
  • Create New...