Re: Header - Post Question...
| From: | Richard Lynch | Date: | Mon, 12 May 2003 08:27:07 +0000 |
| Subject: | Re: Header - Post Question... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147272@lists.php.net to get a copy of this message | ||
Doug Coning wrote:
I have tried embedding the variables in the URL like paypal.com?id=me&amount=5, etc... and PayPal doesn't recognize variables in the URL. It looks like it only recognize it through doing a post.Yes, those are GET variables, not POST.
Now, I could create another PHP page that would be a mediator page that would have my form for just opening the PayPal with button and a bunch of hidden fields, but I prefer to have everything on one page if possible.Not to mention that malicious users could take your HTML form with hidden fields, change whatever they felt like changing, and then POST away to PayPal with their altered settings, completely negating all the validation you wanted in the first place :-) And it would be bad User Interface.
Is there a way to use post with the header command, so that my variables get posted? Am I missing something?Not with the header command, but with fsockopen and fputs, yes. http://php.net/fsockopen http://php.net/fputs If you Google for "POST PHP fsockopen fputs" you should only find a few hundred pages with the same basic sample code. I'll bet a dollar there are solution[s] at Manuel's PHP class repository site as well.