i have an html form,the content of which i am mailing using a php page.On the same page after mailing the contents of the form,i want to redirect the user to a diffrent page using header() function.But it is giving error as "eader has already been send".What is the solution
Thanx in advance Ashish
When you do a header redirect, it must be the 1st thing on any page befoer any other output is sent anywhere else.
Use output buffering, to delay all of the data and send it out all at once in the right order..
ob_start() goes at the front of your code
and ob_end_flush() in the part where you've finished echo-ing
Check the manualfor these functions.