The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

PHP becomes it's own page

At what point do you make a specific page for you PHP script instead of having it as part of your HTML page. I am doing a contact page. I want to place validation, spam control and a way to forward users to a thank-you page after they fill out the form. Just as a guild line when do others make a page specific for PHP and have the information from a form passed on to the PHP page. I hope this question was wordeed correctly?
Pat

I usually post the form on the same page so that if some error occurs i can prefill the form fields and display the error and if the process completes successfully i redirect user to to thankyou page so that post fields is cleared.

I usually post the form on the same page so that if some error occurs i can prefill the form fields and display the error and if the process completes successfully i redirect user to to thankyou page so that post fields is cleared.

That is where I am having a hard time. I have a php post to self in the form, yet I want to echo the form if the email field is not filled in or done incorrect. I keep getting an error message. Here is my complete code.