No need to send them to another page. Data validation is easy to do.
1) Receive the POSTed form data (top of the file)
2) Validate it. Put errors into an array so you can echo them out later
3) Check to see if you found any errors. If not, do whatever you want to do with the data.
4) If there are error, redisplay the page and list the errors so the users knows what they did wrong.
This method also allows you to repopulate the form fields if there is an error so they don't have to type it in again.
Reputation Points: 161
Solved Threads: 38
He's No Good To Me Dead
Offline 1,422 posts
since May 2006