<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title></title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="main.css"/> </head> <body> <div> <?php // define products $products[0][name]='gouda'; $products[0][price]=1.5; $products[1][name]='vachrin'; $products[1][price]=3.5; // write order form print "<form action=\"".$_SERVER['PHP_SELF']."\" method=\"get\">\n"; if($_GET['ordered']) { print "<h1>this is your order</h1>"; $disabled="disabled='disabled'"; } else { print "<h1>Enter your order</h1>"; } print "<table>"; foreach ($products As $product) { $name=$product[name]; $ordered=$_GET[$name]; print "<tr><td>$name</td><td>"; print "<input $disabled name='$name' size='2' type='text' value='$ordered'/></td></tr>\n"; } print "</table>\n"; if(! $_GET['ordered']) { print "div"; // problem found by Susan Kriete print "<div><input value='I order' type='submit' name='ordered'/>\n"; print "</div>"; } print "</form>\n"; ?> </div> <p id="validator"> <a href="http://validator.w3.org/check?uri=referer"><img style="border: 0pt" src="http://dlib.info/valid-xhtml10.png" alt="Valid XHTML 1.0!" height="31" width="88" /></a> </p> </body> </html>