When testing my notify.php IPN handler script, my database is being updated several times. I read that paypal keeps executing the script until it gets a status 200 ok post back.
Well, I get the following warning: Cannot modify header information - headers already sent by (output started at /home/pwd/public_html/notify.php:8) in /home/pwd/public_html/notify.php on line 46
Line 8 is <?
Line 46 has this code:
if (!$_POST['txn_type'])
{ header("Status: 404 Not Found"); exit;
}
else
{ header("Status: 200 OK");
Any ideas?