This form won't post and I can't figure out why. Can anyone spot the problem? The page this code is on is ndainvite.php, so it's posting to itself. I thought maybe it was a processing issue, so I pointed the form action at another page. It just doesn't post.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
I tried removing the XHTML trailing slashes; I also eliminated all but one input until the form was uber simple. Nothing worked until I moved that H3 block. Then everything was fine. Thanks for the pointer on the label tags. Why is it bad to name the Submit button "Submit"?
Because then the form would have a submit method and a submit property and sometimes that can confuse the browser.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
No matter what page this form is on, it'll send back to itself. What happens when you move and/or rename this file, and forget to change the form?
don't rely on the php short tags <?= ?> as some servers might have those turned off by default, and then you code won't process, and you could end up exposing your code to the unwanted eye. Use the full php tags. <?php ?> it's not that much more effort to type the two additional character.
For debugging purposes, I like to use this at the top (or bottom) of my pages, when testing form or session transfers.
PHP Code:
<pre> <?php print_r($_POST); ?> </pre>
This allows you to see exactly what is getting passed through, so it's easier to see what and where things are failing.
Bookmarks