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

input passing parameter

Status
Not open for further replies.

DickEp

Programmer
Sep 5, 2001
26
US
OK, I have struggled with this for a couple of days.

I have a PHP file with form. On this form, there are two buttons. One does the action of calling "process_data.php". Sounds OK, huh? BUT..... I want the button to not only call it, but pass a variable ($tcid) that is generated along the way. So.. here is my code for the form:
<form id="form1" name="form1 method="post" action="process_data.php?tcid=$tcid">

Now pressing the button (that is later), the "stuff" passed is "&tcid" or in other words, the variable name. I have confirmed this by echoing the result in the receiving page.

HELP...........
Ep
 
The main data from the form will be in $_POST. The part in your "action" parameter will be in $_GET.

Is that what you mean?


Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top