old coding shows in yellow color updated coding shows in green color
<html>
<head>
<title>Book Store</title>
</head>
<body>
<table border="1">
<tr>
<th>Product</th>
<th>Price Per Piece</th>
</tr>
<tr>
<td>Book</td>
<td>20</td>
</tr>
<tr>
<td>Pencil</td>
<td>10</td>
</tr>
<tr>
<td>Pen</td>
<td>5</td>
</tr>
</table>
<form method="POST"
action="processedform.php" >
<table>
<tr bgcolor="red">
<td width="150">Product</td>
<td width="70">Quantity</td>
</tr>
<tr>
<td width="150">Book</td>
<td width="70"><input
type="text" size="3" name="book"></td>
</tr>
<tr>
<td width="150">Pencil</td>
<td width="70"><input
type="text" size="3" name="pencil"></td>
</tr>
<tr>
<td width="150">Pen</td>
<td width="70"><input
type="text" size="3" name="pen"></td>
</tr>
<tr colspan="2">
<td align="center"><input
type="submit" value="submit order"
name="submit"></td>
</tr>
</table>
</form>
</body>
</html>
<?php
if(isset($_POST['submit']))
{
$book=$_POST['book'];
$pencil=$_POST['pencil'];
$pen=$_POST['pen'];
}
?>
No comments:
Post a Comment