Thank you djjjozsi
I work with dreamweaver 8 but I didn't make the changes to preview php scripts. I will do it soon.
I change the script to the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
session_start();
echo "<form name=\"aaaa\" method=\"post\" action=\"order_table.php\">";
?>
<table width="457" border="1">
<tr>
<td width="125" align="center" valign="top">#image#</td>
<td width="125" align="center" valign="top">
<input name="quantity1" type="text" value="<?php echo (!empty($_SESSION["quantity1"]) ? htmlspecialchars($_SESSION["quantity1"]):"" ) ; ?>"></td>
<td width="125" align="center" valign="top">item1 for 10$</td>
</tr>
</table>
<br /><input name="submit" type="submit" value="order">
</body>
</html>
I would like one more improvement:
the value that has to be inserted must be a multiple of 6( 6,12,18, 24....).
How should the script look like?
Here the script that has to be revised:
<?php
session_start();
$_SESSION['quantity1'] = $_POST['quantity1'];
?>
<?php
$quantity1 = $_POST['quantity1'];
if ($_POST['quantity1'] != 0) {
print "you ordered $quantity1 item1.<br />";
}
if ($_POST['quantity1'] != 6) {
print "you must order a multiple of 6.<br />";
}
?>
<input type="submit" name="submit" style="background-color:#00CC66" value=" I confirm my order" onClick="location.href='confirm.php'">
<a href="order_form.html"></a>
<input type="submit" name="submit" style="background-color:#FF0000" value=" I change my order" onClick="location.href='order_form_table.php'">
Thank you.