stig1 Posted November 26, 2010 Share Posted November 26, 2010 Hey everyone here at phpfreaks What I would like to know, if possible, is how would i achieve the following: I have a page called confirm.php?id=[uniqueid] [uniqueid] = the next record in the database, so 1 to any number possible. I would like the page to just show confirm.php in the url, however, I still want to pull out of the database some information about the record that was just entered. so from confirm.php?id=100 to just confirm.php Any ideas? Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/ Share on other sites More sharing options...
Pikachu2000 Posted November 26, 2010 Share Posted November 26, 2010 How are you arriving at that page? As the result of a form submission, or what? Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/#findComment-1140080 Share on other sites More sharing options...
stig1 Posted November 27, 2010 Author Share Posted November 27, 2010 arriving from a page called process which processes the form data and then sends a header location of confirm.php?id=100 Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/#findComment-1140168 Share on other sites More sharing options...
Pikachu2000 Posted November 27, 2010 Share Posted November 27, 2010 You mean process actually uses a header() redirect to send the user to confirm? Are the 2 scripts part of the same domain? Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/#findComment-1140170 Share on other sites More sharing options...
stig1 Posted November 27, 2010 Author Share Posted November 27, 2010 yep, so basically i submit the form to a processing page, if errors, returns back to the submit page, but if no errors, it goes to the confirm page. Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/#findComment-1140172 Share on other sites More sharing options...
Pikachu2000 Posted November 27, 2010 Share Posted November 27, 2010 Ok, so it does use a header() redirect, but are they part of the same domain or not? Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/#findComment-1140173 Share on other sites More sharing options...
stig1 Posted November 27, 2010 Author Share Posted November 27, 2010 yes, same domain. my header redirect at preset is confirm.php?id=100 but i want the url in the browser to just show confirm.php Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/#findComment-1140176 Share on other sites More sharing options...
Pikachu2000 Posted November 27, 2010 Share Posted November 27, 2010 Then you should be able to set a $_SESSION variable in process, then get the value of it in the script that is the target of the redirect. Then you can remove the ?id=100 from the url string. Link to comment https://forums.phpfreaks.com/topic/219894-querystring-page-name/#findComment-1140193 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.