Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
09-21-2005, 11:59 PM #1
- Join Date
- Apr 2005
- Thanked 0 Times in 0 Posts
Passing *hidden* POST variables in a redirect?
Let's say I want to have a user fill out a form on myserver.com, process it to check a few variables on myotherserver.com, add some variables to the mix, then submit the whole shebang to myserver.com again within a redirect, so it's like the user submitted the results of the script on myotherserver.com to a script on myserver.com.
Now, I can do this where myotherserver.com puts up a page with the re-constituted form on it and asks them to click a button to finalize their submission, but that adds a step to the process for the user.
I can do this using a Location: redirect, carpentering the vars onto the end of the URL (i.e. ("Location: http://myserver.com/process.php?var1=5&var2=7")) but I don't want the user to see some of the vars that were added and I want the vars available to the script on myserver.com as $_POST['var1'] and $_POST['var2'].
Doing behind the scenes posting with fsckopen() or curl() doesn't work, because that posts the variables to myserver.com, but doesn't redirect the user to the output of the script on myserver.com. I could proxy the output from the second script back to the user, but they remain on myotherserver.com.
So how do I do this? Is it even possible?
09-22-2005, 04:40 AM #2
09-22-2005, 06:30 AM #3
- Join Date
- Feb 2005
- Bradford, UK
- Thanked 66 Times in 65 Posts
sessions wouldnt work because you're moving between 2 servers.
The best way t do it would be to encrypt your querystring.