I wrote the following simple code below to redirect to a specific URL base on the value of $product_id that gets passed to the script...
...if I run the script directly in my browser:
http://www.killerdesign.com/2checkout_retu...hp?product_id=1
...everything works fine and I am re-directed to the correct URL like so:
This is the Thanks1 page
However, what happens with my payment processor, I have nominated my 'redirect.php' script as the script to return control to after successful payment - control is being passed correctly back to my script and still redirects as it should but it always displays "Content-type: text/html"
as the first thing in the browser like so:
Content-type: text/html
This is the Thanks1 page
Any ideas on why this header info doesn't get displayed when I manually run the script but gets displayed when called from another process?
Regards,
Adam
P.S. Here is the actual code of my script ("2checkout_return.php")
== <SNIP> ==
<?php
if ($product_id == '1') {
header('location:http://www.killerdesign.com/adam/thanks1.htm');
exit;
} else {
header('location:http://www.killerdesign.com/adam/thanks2.htm');
exit;
}
?>
== </SNIP> ==