Problem while redirecting user after registration
- by Eternal Learner
I am creating a simple website . My situation is like this. After registering an user, I want to redirect the user after say 3 seconds to a main page(if the registration succeeds) . The code I have now is as below
$query = "INSERT INTO Privileges VALUES('$user','$password1','$role')";
$result = mysql_query($query, $dbcon)
or die('Registration Failed: ' . mysql_error());
print 'Thanks for Registering , You will be redirected shortly';
ob_start();
echo "Test";
header("Location: http://www.php.net");
ob_flush()
I get the error message
Warning: Cannot modify header information - headers already sent by (output started
at/home/srinivasa/public_html/ThanksForRegistering.php:27) in /home/srinivasa
/public_html/ThanksForRegistering.php on line 35.
What do I need to do now ?