Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. The technical difference is that false and empty string are two different data types. One is boolean and the other is a string. While an empty string becomes false when converted to boolean, it is not itself false, it is a string with zero characters in it. When initializing variables, I will use true or false if my variable is meant to be a boolean and I'll use an empty string if I intend for the variable to be a string. In other programming languages you would not be allowed to set a string to false or a boolean to "". I personally advise against changing the type of data in your variable.
  2. The code is not running fine if it's not doing what it's supposed to. You have to fix the validation errors, pages should always be valid HTML. Firstly, this is not a valid HTML comment: <!TRPID Input box-> Some browsers may print that text, others might figure out you meant to write a comment. Some of them might interpret it as a document type declaration which would actually screw up the rendering of your CSS. This is how an HTML comment has to be written. <!-- TRPID Input box --> There are other issues in your HTML as well.
  3. The variable dropDownID is only accessible from inside the function it was declared in.
  4. The question is still not specific enough. How do you want to display the seats? Are they images? Text? What HTML structure do you want to use? Furthermore, what is your current database structure and what code have you written so far?
  5. Is there a question or are you just asking somebody to make that? Nobody is just going to build such a complex system for you without compensation.
  6. The W3Schools website makes a lot of money on advertisements, they don't really need donations. http://www.w3schools.com/about/about_advert.asp They don't show prices anymore on the site, but back then a single small text link was $1,200 monthly, so they're making quite a lot of money.
  7. Flex box works better, but browser support is still lacking. Using float and clear is just fine as long as you are aware that containers don't wrap around floated elements by default.
  8. Your problem is that you've closed the link tag before the text. This is what you have: <a href="page2.html"></a>page 2 The words "page 2" are not actually part of the link because they're not inside the element.
  9. There's a page in the tutorial explaining that: http://www.w3schools.com/jquery/jquery_get_started.asp
  10. That's not Javascript, it's jQuery. It won't work unless you include a jQuery library. You could also rewrite that as real Javascript instead.
  11. The only reliable way to prevent SQL injection is to use prepared statements. Read the tutorial page about it. http://www.w3schools.com/php/php_mysql_prepared_statements.asp Anything else is prone to oversights and mistakes. You shouldn't need to store HTML entities, that's not a protection against SQL injection. The reason your code is not behaving as expected is because a clone of the array is created when it is passed into the function. The original array is unaffected. Look up passing by reference in the PHP manual.
  12. Ingolme

    Custom radio button

    You can use the cursor property to determine what the mouse looks like when over the element.
  13. It's never a good idea to dynamically create tables. Database are designed to handle millions of records, so I would recommend having just one table for the tickets.
  14. Javascript is more difficult than HTML and CSS because it's a real programming language. You haven't created a function. The first three words of the problem are "Write a function". You should first learn how to make a function here: http://www.w3schools.com/js/js_functions.asp
  15. The W3Schools tutorials only cover PHP 5.
  16. It is a valid concern. It is a good idea to support IE9 and above. Which page is this occurring on? At the bottom of every page is a link labeled "REPORT ERROR". Click on that and report it there, that's probably the best way to contact the W3Schools staff.
  17. Txt files don't have a specified font, but they are generally represented with a monospace font in most text editors.
  18. It's a .txt file, so I think that's a safe assumption to make.
  19. Both options are exactly the same regarding protection and performance. The method you use depends on which one you find easier to maintain. Do you prefer larger amount of code in one file or small pieces of code in multiple files?
  20. You wouldn't need it inside directories you don't want to protect. The more directories you have, the harder it's going to be to keep track of all your .htaccess files. You could also just have one .htaccess file in the root and use directives to choose which folders and files to protect.
  21. Ingolme

    Custom radio button

    The radio button needs to be outside the label for the + selector to work.
  22. You would have to program that yourself. Look through all the data of each column to find out the longest value and make the width of the column wider than that, then when writing to the file you pad all the strings with enough spaces to match the width of the column they belong to.
  23. Ingolme

    Index vs Key

    I'm quite sure that phpMyAdmin allows you to set primary keys, foreign keys and unique keys.
  24. I believe the first question is to figure out what the function does, that's why the function is named "whatisthis". The function in the first question will probably not work as the creator intended due to the ambiguity of the + operator.
×
×
  • Create New...