hi all
I have been trying to creat a contact form using xhtml and php.
so far I have managed to create form which allows users to enter their details and when the user presses the submit button all this information is sent to my email address.
This is quite easy to do. My next step however was to create some form of validation which would:
- check to see if any fields are empty
- check to see whether the email entered is valid.
This has become some what of a problem, because im not sure how to approach this problem. I know what I want my php form to do, the listing is as follows:
- The form is displayed; you fill it in.
- You submit the form to the server.
- If you missed something out or provided invalid input, the form is redisplayed pre-filled with the valid data you already entered.
- The redisplayed form tells you what you got wrong.
- Loop until you fill the form in correctly.
This is what I think a form should function as, I just want to let you all know that I am a complete newbie to PHP, so I am looking for a solution that is not to difficult to implement into my current design or if failing that then it is at least well documented.
If there is anybody that can provide information on how to approach this problem it will be most appreciated.
regards
w9914420