I have a php page which has two submit buttons that are meant to do the same thing, but when either are pressed they just go to ‘searchLN.php’. When I take away the button and you just press enter on the text it goes to the correct page, what am I doing wrong??
<?php
echo '<h1>Search Patients</h1>';
echo '<td><form method="post" action="searchLN.php">';
echo 'Search By Patient Last Name :<input type="Text" name="searchPersonLN" class="button">';
echo '<input type="Submit" name="searchPersonLN" class="button" value="Search" ';
echo '</form></td>';
echo '<br>';
echo '<td><form method="post" action="searchID.php">';
echo 'Search By Patient Number :<input type="Text" name="searchPersonID" class="button">';
echo '<input type="Submit" name="searchPersonID" class="button" value="Search" ';
echo '</form></td>';
echo '<br>';
echo '<a href="index.php">Return To Main Menu</a>';
?>
You don’t close your input with
>or/>, so, the next line’s</form>don’t close your form.