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

Styling

	<input type="submit" class="FormSubmitButton" value="Submit This" name="action0"  onClick="DoSomthing" />

input.FormSubmitButton	{
	color: #115068;
	background-color: transparent;
	text-align: center;
	width: auto;
}
input.FormSubmitButton:hover {
	color: #FF0000;
}

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 ($_POST['submit_button_action'] == 'Save Message')
{
	//----- FORM SAVE MESSAGE -----
	echo "Save <br />";
}
else if ($_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>
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published.