Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Yes, for security it's a good idea to put it in both cases. These are things you should think about.
  2. The <h1> is a block element, if you want it to go between the images, set its display to inline. The align attribute is only for the <img> element and it's deprecated. If you want something that works on all elements, use CSS float.
  3. Clear the token from the database if the timestamp is older than the timeout limit.
  4. This is a really bad idea. ActiveX objects are obsolete and it's terrible for usability to tell the user what browser to use. What good reason is there to use Internet Explorer, anyways? If you're going to send the user to a different browser it might as well be something useful like Firefox or Chrome.
  5. Press F12 to open the Javascript console, then click the button and see what shows up there. Your code will fail if somebody types ' OR 1 OR ' as their e-mail address. You should research SQL injection.
  6. You can have a button there, it doesn't necessarily have to be a submit button.
  7. You can chain multiple selectors using the comma: .top a,.topleft a,.topright a { color: inherit; text-decoration: none;}
  8. When a block element has float applied to it, it can be placed horizontally next to other elements. As for the meaning of the CSS selectors, they're all explained in the selectors reference.
  9. Javascript can send information to PHP using AJAX. W3Schools has an AJAX tutorial.
  10. You can either do it using a server-side language or by using Javascript. Using a server-side language requires reloading the page. If you use Javascript, you use DOM methods to access the dropdown elements, then compare them. Once you have a result you can access an <img> element using DOM methods and modify its src property to show a different image. If you decide to use a server-side language, you need to get the variables sent by a POST or GET methods, do the comparisons and print out an <img> tag putting a particular value in the src attribute. Getting more specific would require knowing what server-side language you plan to use.
  11. What are you comparing? Normally you would have a database organizing the data into fields, you would use SQL to order and filter the results. This is not a simple task, it's an entire project, so you won't find code samples online for it.
  12. That's not PHP's fault. If you didn't actually give it any data to work with, it's not going to know what to do.
  13. You seem to be making distinctions where there aren't any. CSS isn't expected to change for a long time. The names of the HTML elements you use don't have any effect on the layout as long as you're using CSS properly You should be using <h1> - <h6> elements to structure your content, Google and other search engines will give you a better ranking if you use them properly. If you don't like their default style, just change its appearance with CSS. The most modern practice for layout is to use float, width, margin and padding to lay things out on the page. Be sure to use the appropriate elements for the context, such as <section>, <article>, <p>, <figure> and so on.
  14. An encrypted message is one that can be decrypted, you can find that in the dictionary or encyclopedia. I would not recommend SHA-1 or MD5 for password hashing. The execution time of those algorithms is too short.
  15. What system are you using to send the mail?
  16. Internally the time is stored as the number of milliseconds that have passed since 1970. That's called a UNIX Timestamp. It's a popular standard to store time. If you need older dates you will need to create your own date object and do the calculations yourself.
  17. You can use border-collapse on the table I don't recommend having empty <td>s there just for spacing. If you want spacing use padding or margin.
  18. To have at least 100px in height, just set min-height to 100px on all the elements you want to change. If you want the <div> to be 100px, put it on the <div> element.
  19. Because the PHP doesn't know what the HTML does. Everything outside the <?php ?> block is completely irrelevant to the code. As far as PHP is concerned, there's no difference between <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> and ABC<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>XYZ
  20. The W3C validator is owned by the W3C. They created HTML, so I'm quite sure they know which HTML is correct or not. They are the one authority when it comes to HTML.
  21. You can create them in SVG, make each one a <glyph> and use that as a font. There are online converters to convert SVG fonts into other fonts. The thing is you can't use bitmap images for fonts, they have to be vectors.
  22. What problem are you having with the geolocation API? Have you tried it? Update For Wordpress there are plenty of Geolocation plug-ins https://wordpress.org/plugins/tags/geolocation
  23. It probably has to do with using display: table-cell on all the divs. Table cells will, collectively, try to occupy all the space of the table they're within.
  24. You could do this: <a href="#New-Wine-in-Old-Bottles">New Wine in Old Bottles</a><h1 id="New-Wine-in-Old-Bottles">New Wine in Old Bottles</h1> or this: <a href="#New_Wine_in_Old_Bottles">New Wine in Old Bottles</a><h1 id="New_Wine_in_Old_Bottles">New Wine in Old Bottles</h1>
  25. Is there any Javascript on your page that's manipulating the checkboxes? Also, when testing the page, don't refresh it, go to the address bar and press Enter to reload the page. When you refresh the page, some browsers keep the values that the inputs had, so if a checkbox was unchecked it will remain unchecked.
×
×
  • Create New...