Thanks for your help. it took me a while to sort it but that was just what i needed.
Integrating with ease now.
I gave up with headers a while back when using someone elses code. Here is my dirty solution to the problem of which I’m not proud.
It tries to relocate, then if it fails, it attempts it by javascript. if the user doesn’t have javascript active (is there anyone in the world that doesn’t?), it gives a clickthrough.
if (!headers_sent($filename, $linenum))
{
header("Location:?page_id=160&sort=1");
exit;
}
else
{
echo 'Affiliate deleted.<br /><br /> If you are not redirected, click <a href="?page_id=160&sort=1">here</a> manually return to <a href="?page_id=160&sort=1">Affiliate Directory</a>';
echo '<script> self.location="?page_id=160&sort=1"; </script>';
exit;
}