How to redirect a webpage request while keeping all POST variables to another PHP page
March 22, 2007 9:01 AM Subscribe
Is there an easy way in PHP to send all the POST variables submitted in a form to another webpage?
I am currently using the PayPal API for some shopping cart/order management things I've custom written. For a short period of time, I need to use two different IPN scripts. The way the IPN for PayPal works is that data is sent from PayPal to a PHP script on my website with a number of POST variables. I would like to send that same page request (with the post variables in tact) to another PHP script/page. Is there an easy way to redirect the web page request PayPal sends to another web page, with all the POST variables in tact after it has been received on my site?
Is there some straightforward way to do this?
I am currently using the PayPal API for some shopping cart/order management things I've custom written. For a short period of time, I need to use two different IPN scripts. The way the IPN for PayPal works is that data is sent from PayPal to a PHP script on my website with a number of POST variables. I would like to send that same page request (with the post variables in tact) to another PHP script/page. Is there an easy way to redirect the web page request PayPal sends to another web page, with all the POST variables in tact after it has been received on my site?
Is there some straightforward way to do this?
Response by poster: 301 redirect worked like a charm.
Just saved me a bunch of hassle. Thanks!
posted by JakeWalker at 11:37 AM on March 22, 2007
Just saved me a bunch of hassle. Thanks!
posted by JakeWalker at 11:37 AM on March 22, 2007
Well, sure, if you want simplicity you could use a 301... :)
posted by jeffxl at 12:47 PM on March 22, 2007
posted by jeffxl at 12:47 PM on March 22, 2007
This thread is closed to new comments.
Something like this should work: posted by jeffxl at 9:12 AM on March 22, 2007