psytae Posted October 11, 2010 Share Posted October 11, 2010 I have a web page that uses $_POST to pass the ID from web page to web page as they fill out forms using $ID=$_POST['id'] The last page of the form passes this and other information to a php page that inserts the information that was passed into a database I have set up and then redirects back to the first page of the form. This is what I have so far. <?php // Change to the URL you want to redirect to$URL="Start.php"; header ("Location: $URL"); $ID=$_POST['id'];?> What I want to happen however is when it redirects, I want it to pass the ID information back to the main page again as well. Can anyone help me out? Link to comment https://forums.phpfreaks.com/topic/215631-php-redirect-with-_post-data/ Share on other sites More sharing options...
litebearer Posted October 11, 2010 Share Posted October 11, 2010 Might look into using sessions http://www.suite101.com/content/using-a-php-session-a102893 Link to comment https://forums.phpfreaks.com/topic/215631-php-redirect-with-_post-data/#findComment-1121155 Share on other sites More sharing options...
AbraCadaver Posted October 11, 2010 Share Posted October 11, 2010 Yes, or: $ID = $_POST['id'];header("Location: $URL?id=$ID");exit; Then you would access $_GET['id'] on the next page. Link to comment https://forums.phpfreaks.com/topic/215631-php-redirect-with-_post-data/#findComment-1121160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.