<input type="submit" value="SEND" name="btnSubmit" />

Styling

See here

Using An Image For The Button

	<input type="image" src="images/my_button.png" alt="Call" name="submit" />

Multiple Submit Buttons

Just using the different values
<?php
if ((isset($_POST['submit_button_action'])) && ($_POST['submit_button_action'] == 'Save Message'))
{
	//----- FORM SAVE MESSAGE -----
	echo "Save <br />";
}
else if ((isset($_POST['submit_button_action'])) && ($_POST['submit_button_action'] == 'DISPLAY IT'))
{
	//----- FORM DISPLAY MESSAGE -----
	echo "Display <br />";
}
?>
  <form id="MyForm" action="http://www.mydomain.com/some_file.php" method="POST">
    <input type="submit" value="Save Message" name="submit_button_action" />      
    <input type="submit" value="DISPLAY IT" name="submit_button_action" />
  </form>
Using different name parameters instead
if (isset($_POST['MyButton1']) && ($_POST['MyButton1'] != Null))
{
}
if (isset($_POST['MyButton2']) && ($_POST['MyButton2'] != Null))
{
}
  <form id="MyForm" action="http://www.mydomain.com/some_file.php" method="POST">
    <input type="submit" name="MyButton1" value="Save Message" />      
    <input type="submit" name="MyButton2" value="DISPLAY IT" />
  </form>

Different Value and Button Text

  <button type="submit" name="MyName" value="MyValue">My Button Text</button>
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published.