AFAIK, without javascript its not possible. Here is how i'd do it:
1. Your html page:
Code:
<html>
<head><title>Display by id</title>
<script language="Javascript">
function button1()
{
document.Form1.action = "search_prev.php";
document.Form1.submit();
return true;
}
function button2()
{
document.Form1.action = "search_by_id.php";
document.Form1.submit();
return true;
}
function button3()
{
document.Form1.action = "search_next.php";
document.Form1.submit();
return true;
}
</script>
</head>
<body>
<table align="center">
<form method="post" name="Form1" id="Form1">
<tr><td><b>Enter the Book id:</b></td>
<td><input type="text" name="id" size="10"></td></tr>
<tr>
<td><input type="image" name="search_prev" src="images/prev.JPG" width="71" height="34" onclick="return button1()"></td>
<td><input type="image" name="search_by_id" src="images/Go.JPG" width="71" height="34" onclick="return button2()"></td>
<td><input type="image" name="search_next" src="images/next.JPG" width="71" height="34" onclick="return button3()"></td>
</tr>
</form>
</table>
</body>
</html>
2. Your php page:
PHP Code:
<?php
if (isset($_POST['id'])) {
$value = $_POST['id'];
}
?>
Now the form value will be stored in $value and u can use it anytime you want. Say, you can echo it out:
You should also take security measures before using he value. Such as, escape sql special character using function
mysql_real_escape_string, stripe html tags using
strip_tags in order to prevent cross site scripting attack.