Click to See Complete Forum and Search --> : submit button value different than post value


Xtrme_XJ
03-09-2010, 11:17 PM
When a button is clicked I want it to post that value to a php page. The problem is I want the text on the button to say something different.

Here is my code and what I want the output to be.


<form action="removeEvent.php" method="post">
<input type="submit" name="buttonUnit" value="Remove">
</form>


I want the button to have the word remove on it but POST something different.

donatello
03-10-2010, 02:04 AM
Now set your php to look for "foo" instead of buttonUnit.

<form action="removeEvent.php" method="post">
<input type="hidden" name="foo" value="foo">
<input type="submit" name="buttonUnit" value="Remove">
</form>

Charles
03-10-2010, 04:51 AM
<button type"submit" value="foo">Bar</button>