I have a form with one input text field named 'number' and 2 submit button named 'search' and 'back'. According to my submit button, i also have 2 condition ('search' condition and 'back' condition).
'number' will be used in 'search' condition. How can i run 'search' condition without clicking the button ? I want it run only with pushing enter button on our keyboard after typing any text in input text field ?
Here's my script :
<?
if ($back) {
header("Location:Menu.php");
}
?>
<body>
<form method=post action='<? $PHP_SELF ?>'>
Nomor : <input type=text name='number'>
<br><input type=submit name='search'><input type=submit name='back'>
</form>
<?
if ($search) {
/ any query to database ... /
}
?>