English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a script that processes a form, adds some stuff to a database, and I need it to then Redirect and Post some data to another site/page.

I am able to post to the page using a sendToHost function, but I need the user to go to that page with the data as well.

I'm pretty sure that you cant do this with the header function, and I cannot use the Get function because it is not allowed for this purpose.

Is there any way to do this with Curl or something else. I have searched around all morning, and while I can find 50 ways to have php post the data to the page, I haven't found a way for the user to get redirected to that page and the Post variables go with them.

Any help would be appreciated.

2006-09-15 05:41:29 · 3 answers · asked by Jestep 5 in Computers & Internet Programming & Design

**In response to Elmer**

I need php to send the user and the data exactly like I just hit a submit button. I would use a form itself to post to the page, but I need php to process some data for my site, and then send it and the user to another site. I dont need any response at all from curl, since the user should no longer be on my website.

2006-09-15 05:51:30 · update #1

I was tempted to write an Ajax script and use a javascript redirect to send the user to the other page, but I cant take the usability risk of using javascript, and having users with incompatible browers.

2006-09-15 05:54:00 · update #2

3 answers

There is no way to redirect using POST method; HTTP does not allow it. What you can do, however, is to save user data into session variables or into a database and have the script to which you redirect retrieve it from there...

2006-09-15 06:04:43 · answer #1 · answered by NC 7 · 0 0

You can definately do it with curl, just google curl tutorials.

What exactly are you trying to achieve, do you want to monitor the response from the other server (after posting form values) and depending on the response you change your response to the user? That can be done with curl.

Many ecommerce sites use curl for credit card transactions, they send the details to an external site, use curl to save the page of the response in a variable, than in php view the response string to either see if its "Authorized" or "Denied".

2006-09-15 05:45:37 · answer #2 · answered by Elmer Fudd 6 · 0 0

AHH hilarious! My mothers and dads think of i'm loopy now, however. They got here working upstairs because of the fact they concept i replaced into crying, and then they got here into my room to locate me guffawing to myself. This concern is SO real! i will tournament each little thing to my very own wiggle butt chum that some call a dogs :) Yep, my dogs LOVES snow...yet his admired area approximately snow is working previous me once I attempt to wipe off his feet and then monitoring melted snow throughout my homestead.

2016-12-12 08:58:22 · answer #3 · answered by shoaf 4 · 0 0

fedest.com, questions and answers