Jump to content

How do i redirect a page?


Perad

Recommended Posts

I have seen it done with headers but this is needed half way down my script and it keeps saying "headers have already been sent."

Currently i have this code. My client though doesn't want to have verification, instead he just wants the page to redirect itself when the comment has been posted.

echo "<div class=\"confirmation\">Comment entered. Thanks!\n";
echo "<a href=\"{$_SERVER['PHP_SELF']}" . "?action=show&id=$id\">Back</a></div>\n";

How can i edit this to make it go directly to the link?
Link to comment
https://forums.phpfreaks.com/topic/32391-how-do-i-redirect-a-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.