Help a PHP noob please
Posted 13 September 2006 - 04:00 PM
I was thinking I could have some error messages with display:none, which I then switch to display:inline but I really have no idea how to do that with PHP (if you can at all).
Ok, basically, how do I send the user back to contact.htm after PHP validation fails, with the form remaining as it was, and alert them to the errors?
Edit: I understand how to do it if I just use one php page. Is this advisable?
Posted 13 September 2006 - 04:30 PM
BUT, if you wanted to use 2, you could easily do your validiation on mailer.php and if the validation failes, simply use the header() function to redirect them. You still have to change the form page to a php page and include the error messages in case you have to go back and so on and so on.
Long story short, it's easier to do it all within the same page and leave the validation to PHP.
Info: PHP Manual
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users