Possible Duplicate:
Reference - What does this error mean in PHP?
I have problem in Header function. I want to redirect the page to the paypal after the insertion in database. Insertion query is working correctly pay header function is not working.
Here is my code
{
mysql_query("INSERT INTO bookings (date,time,hired_consultant,status,user_id) VALUES ('$date','$time','$hired_consultant','pending','$user_id')",$link)or die("Invalid: " . mysql_error());
header("Location: https://www.paypal.com/cgi-bin/webscr");
exit();
}
After insert following error appears:
Warning: Cannot modify header information - headers already sent by (output started at /home/nausalho/public_html/HumanResource/selection1.php:2) in /home/nausalho/public_html/HumanResource/selection1.php on line 101
Its is working fine on my localhost. But on live site it didnot redirect me to the paypal, just appear error message on the same page.
Please figure out my mistake in code or any other redirect method. Thanks in advance,