Possible Duplicate:
Headers already sent by PHP
if($sendmail) {
echo "<div class=\"success\" class=\"regdet\">Congratulations $name! You have successfully registered for <span>AADAB 2013</span>! An email has been sent to your email with the details of your form.<br><br>If the page does not automatically redirect you in 5 seconds, click <input type=\"button\" value=\"Here\" onclick=\"window.close()\"> to continue.</div>";
header (refresh: 5, url="form.php");
} else {
echo "<span style=\"color: red; background: rgba(219,219,219,0.7);\">There was an error in submitting your form. Click <a href=\"form.php\">here</a> to try again!</span>";
}
I am trying to redirect the user to the form (which is the current form which has both, the form and the PHP commands) after 5 seconds ... since it is not happening, I am trying to include a button which will close the window after it is pressed on the form confirmation page.
That too is not occurring.
the message is being displayed and the form is delivering emails to my email account perfectly, but this small part is bugging me a lot !