<html>
<body>
<form action="" method="POST">
<table border="1" cellpadding="5" align="center">
<tr>
<td>ID:</td>
<td><input type="text" name="id"></td>
</tr>
<tr>
<td>Quantity:</td>
<td><input type="text" name="add_qty"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="submit" Value="Add"></td>
</tr>
/table>
</form>
</body>
<?php
// connect to the database
include('connect-db.php');
// check if the 'id' variable is set in URL, and check that it is valid
if (isset($_REQUEST['submit']))
{
// get id value
$id = $_POST['id'];
$qty = $_POST['add_qty'];
echo $id;
echo $qty;
//mysql_query("UPDATE master_tbl SET qty_left = qty_left + '$qty' WHERE machine_no_id='$id'");
//header("location: show_result.php");
}
?>