Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing info from a form in a htm to a .php 1

Status
Not open for further replies.

mtbcoach

Programmer
Feb 11, 2001
9
CA
Hi,

I would like to know. Wend a passe info from a html form to a .php does it send the form object in a cooky or in the computer memory????

Thank you for your time

Mathieu G.

 
Variables from a form arrive on the server they are posted to. They come either in the URL (GET) or in the header (POST). In both cases, these then become variables accessible to the php script as it runs on the server. The script executes, (optionally retrieving stored session variables), and generates HTML. When the script has finished, if a 'session' has been started and the variables have been 'registered', the HTML has a cookie added to the header with a reference to the names and values of the variables as they were at the completion of the script. Only then is the output sent back to the client.

I hope that this clears up your confusion.

-Rob
 
Yeah, for example if an option is called 'name', you would just reference it iwth $name.

Its that simple :) I'm sure there are other ways of doing it, but this is how i do it ;)

Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top