[web] Using the input tag to collect information.

Started by
1 comment, last by CuppoJava 15 years, 11 months ago
Hi, When I create a button using <input type="submit" name="StepButton" value="Add Step" /> The button has the words "Add Step" on it, and it sends a parameter "StepButton=Add Step" to my php script. Is there anyway to send what I need from the button? ie. I want the button to send the parameters "StepButton=132214" but still display "Add Step" on the actual button. Sorry if that wasn't clear. Thanks a lot for your help -Cuppo
Advertisement
Just add a hidden field to your form to send additional parameters, that's what they're for.

<form method="post" action="script.php">  <input type="hidden" name="step" value="132214"/>  <input type="submit" name="StepButton" value="Add Step" /></form>
Thank you so much.
That's exactly what I was looking for.
-Cuppo

This topic is closed to new replies.

Advertisement