Jump to content
  • Advertisement
Sign in to follow this  
CuppoJava

[web] Using the input tag to collect information.

This topic is 3720 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!