bigtamt Posted April 20, 2006 Share Posted April 20, 2006 HelloI 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 Quote Link to comment Share on other sites More sharing options...
insrtsnhere13 Posted April 20, 2006 Share Posted April 20, 2006 i think what you want to do is basically type some text into a text box, and have that be outputted onto a different page?if you want it temporarily im pretty sure headers are the way to goif you want it permanently youll want to store the text in a database Quote Link to comment Share on other sites More sharing options...
bigtamt Posted April 20, 2006 Author Share Posted April 20, 2006 HiThanks 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 Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted April 20, 2006 Share Posted April 20, 2006 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). Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted April 20, 2006 Share Posted April 20, 2006 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] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.