Page 1 of 2
Is this posting to a form possible.
Posted: Wed Jan 31, 2007 4:42 pm
by tecktalkcm0391
I want to have variables like $first_name = 'Chris'; and stuff and send them to another site via post (thats all they except) and then fowarding a user to the page... with the same information i just posted. Is that possible? CURL?
Posted: Wed Jan 31, 2007 4:44 pm
by superdezign
I've never tried it... but could you do it through <form action="?">? Or does that restrict you to your own server? If not, it's that simple. Like I said though.. I've never needed to try.
Edit: I gave it a look and you can send posted variables to other sites just the way I described.
Posted: Wed Jan 31, 2007 5:42 pm
by tecktalkcm0391
I know, but I wanted to keep the information more secure by not showing the user anything in the HTML.
EDIT: Just read
http://netevil.org/node.php?nid=937 can that work where I post data, say to Paypal, and then foward the user along with the posted data.
Posted: Wed Jan 31, 2007 6:05 pm
by RobertGonzalez
First question: What have you tried so far?
Second question: Are you talking about redirecting and posting at the same time? If so,
this was just asked about three days ago.
Posted: Wed Jan 31, 2007 6:10 pm
by tecktalkcm0391
I am so confused on how the CURL and stuff works, nothing yet. I want it to be like this. (if posssible) [which isn't what that 3 day old post did]
User clicks checkout.
PHP Pulls information from Database/Sessions...
POSTs or whatever Paypal needs over to paypal, then fowards them to where they enter there credit card information (on paypal).
Posted: Wed Jan 31, 2007 6:16 pm
by RobertGonzalez
I would just have your form action set to the Paypal processing page then.
Posted: Wed Jan 31, 2007 6:22 pm
by tecktalkcm0391
I wanted it to check the database before it sent to check prices and other vaules to make sure the user hasn't tried to edit them
Posted: Wed Jan 31, 2007 6:23 pm
by RobertGonzalez
Then you are going to have to use cURL. And more than likely you will have to tap into Paypal's API.
Posted: Wed Jan 31, 2007 6:25 pm
by tecktalkcm0391
Ok, but I am really new at Paypal and this stuff. What do you mean my tapping into Paypal's API.
Posted: Wed Jan 31, 2007 6:27 pm
by tecktalkcm0391
Everah wrote:Then you are going to have to use cURL. And more than likely you will have to tap into Paypal's API.
Also, can cURL send the user to the page after it sends the data?
Posted: Wed Jan 31, 2007 6:30 pm
by RobertGonzalez
No, you are going to have to redirect them with some other mechanism. A
header() redirect perhaps...
Posted: Wed Jan 31, 2007 6:32 pm
by tecktalkcm0391
But, wouldn't the data not be sent to the same page they are going to?
Posted: Wed Jan 31, 2007 6:35 pm
by RobertGonzalez
Look into cURL and how it works. cURL will essentially reach out and post application data to another application on another domain. Redirecting, a wholly different thing, will simply take the user to another location. The two processes are totally different and need to be treated as such.
Posted: Wed Jan 31, 2007 6:41 pm
by tecktalkcm0391
Ok, well i just found this:
http://ilia.ws/archives/152-Cross-Domai ... ction.html couldn't i do something like that to get the information to paypal.
Edit: Nevermind, cause that data won't be posted it needs to be posted.
Posted: Wed Jan 31, 2007 6:44 pm
by RobertGonzalez
I suppose you could try it.