September 23rd, 2008, 10:30 AM
PHP: forwarding POST data
i was wondering if there is an easy way to forward POST data from one PHP script to another?
for example if i were to have an initial web page and 2 following PHP scripts, which all collect information from a user. on the first web page there is a HTML form through which the user enters their name, this form then posts that data to a PHP script. then this PHP script collects the name data (from the initial page) and displays a HTML form to collect the user's address information, this form then posts the address data to a second PHP script and forwards the name data. then the second PHP script displays the information for confirmation, before it is forwarded to a final PHP script which updates a database.
i can post data from one form to a PHP script, such as the name from the initial web page to the first PHP script. but it is the forwarding of POST data that i'm not sure how to do, such as forwarding the name data (with the address data) from the first PHP script to the second. i suppose that i could use a temp text file to store the data from each form, but i was hoping that someone could inform me of a better way to acheive this forwarding of POST data?
thanks in advance,
Last edited by user0182; September 23rd, 2008 at 10:33 AM.
September 23rd, 2008, 02:43 PM
There are a number of ways...two that come to mind are hidden form inputs and cookies...make sure you don't trust either
There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.
(Merovingian - Matrix Reloaded)
September 23rd, 2008, 04:11 PM
Experience is something you don't get until just after you need it.
September 23rd, 2008, 08:21 PM
Yep - you can pretty much use hidden fields in a form, cookies, or session variables.
By 576869746568617 in forum Cryptography, Steganography, etc.
Last Post: July 10th, 2006, 10:38 PM
By jerichoholic in forum Spyware / Adware
Last Post: November 30th, 2004, 10:14 AM
By blackmask in forum Other Tutorials Forum
Last Post: November 1st, 2002, 11:59 AM
By Noble Hamlet in forum AntiOnline's General Chit Chat
Last Post: March 17th, 2002, 08:38 AM
By E5C4P3 in forum Miscellaneous Security Discussions
Last Post: March 7th, 2002, 06:35 AM