Sign in to follow this  

[web] Using the input tag to collect information.

Recommended Posts

CuppoJava    164
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

Share this post

Link to post
Share on other sites
Wan    1366
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" />

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this