Skip to content
Advertisement

How do I navigate to another page when PHP script is done?

I have a simple POST script that I need to return to the page that was doing the Posting.

Is there any way to do it like this?

if($done)
    {
        //go to page
    }

Advertisement

Answer

if ($done)
{
    header("Location: /url/to/the/other/page");
    exit;
}
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement