Page 1 of 1

How to reach other pages in my website with php

Posted: Tue Sep 17, 2002 1:12 pm
by MyerInd
I have written a php script that takes data from a form and places it in a database. At the end of this script, after successfully putting the data in the database, I want to take the person directly to another/next page on my website. I can create a link that has to be clicked on, but this is unnecessary. I want to go on to the next page automatically.

I have been unable to get fopen()/fgets() to work. readfile() works on a url like amazon.com, but only some of the items on my page are displayed.

Any suggestions?

Ron

Posted: Tue Sep 17, 2002 1:25 pm
by JPlush76

Code: Select all

<?php
header("Location: index.php");
?>

Posted: Tue Sep 17, 2002 1:27 pm
by mr_griff
You can use this code if you have not displayed anything to the user yet.

Code: Select all

<?php
//Process posted data here

//If everything worked
header ("Location: newpage.php");
exit();
?>