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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing a CONSTANT value from one form to another.

Status
Not open for further replies.

peterv12

Technical User
Dec 31, 2008
108
US
I'm writing a multi-page PHP website. What I want to do is have a PHP script that determines what processing to do based on which form sent it control. I'd like to be able to set up a CONSTANT value on each of the sending forms, and be able to pass that to the processing script. For example, if the processing script gets the value form1 it would search a database, if it got form2, it would list specific records. I know how to pass form fields using _POST, but I'm having trouble trying to pass something that isn't entered as input on the form. Is there any way to code something like this on the passing form: $constant = form_name and pass $constant to the processing form? I'm relatively new to PHP, and am used to other languages where this is possible. I'll appreciate any help.
Peter V.
 
NEVER MIND!

I just found the HIDDEN input attribute which solved my problem!

PV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top