Jump to content

Help with posting data to another page.


bigtamt

Recommended Posts

Hello

I am looking for some help with headers.

I need to open a new web page and “post” data to it. I think I have to use the header commands but I am a bit unsure.

Can any one suggest some basic code to allow me to set up a header (or whatever) that would allow me to do this.

I am know that I could set the location to point to the url and add the different elements (data) onto the end of it but I need to make it private so that people don’t know what data I am posted to the other site.

Any help would be great.

Thanks
Link to comment
Share on other sites

Hi

Thanks for the info.

Thats what I am doing.

What is happening is a checkout page, the user confirms the amount of goods to buy and then I need to open a new page posting the data from the user and an mysql database.

The problem I am facing is that I need to post all the gather data (user input/mysql) over to paypal so that all the date will not apper in the address bar. ie allow the user to change the data.

so far I ve got something like


[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]header("Location: [MY URL]");[/quote]
I know that using something like
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]header("Location: [MYURL]?current=34&user=66");[/quote]
would work but it would also show the data in the url allowing people to change it.

Any ideas.

Thanks
Link to comment
Share on other sites

My terminology is going to be off here -- so if there is a real expert out there, feel free to correct me.

Basically, there are two headers, a request header (like what your browser sends to a) and the HTTP header a website sends back to the browser.

the PHP header is for the latter. To accomplish the former, you'd probably have to create the form and then use a javascript onload method to post that form (Oh, and cross your fingers that the user has javascript on in their browser.)

There are ways to accommodate users who don't have javascript -- like including a "SUBMIT" button they can click on. You could also use an onload method to disable the submit button, (if javascript won't automatically submit the form, it also won't automatically disable the submit button).
Link to comment
Share on other sites

if you still want to experiment, I found this neat site that might help:

[a href=\"http://web-sniffer.net/\" target=\"_blank\"]http://web-sniffer.net/[/a]

you can "post" data just like you would using the get method -- at the end of the URL -- just be sure to select the "POST" method on the page.

[a href=\"http://www.example.com?name=bob&address=123%20easy%20street\" target=\"_blank\"]http://www.example.com?name=bob&address=123%20easy%20street[/a]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.