BSIT3B July 20,2013 index.php <!DOCTYPE>
<html >
<head>
<title>labexam_viado</title>
</head>
<body>
<div id="container" style="width:1000px">
<div id="header" style="background-color:#A9A9A9;">
<h1 style="margin-bottom:0;"><center>LAB Exam</center></h1></div>
<div id="menu" style="background-color:#FFE4C4;height:500px;width:1000px;float:left;">
<form action= "numberPick.php" method="Post">
<table border="0">
<tr>
<td><b>Enter first number:<td> <input type="text" name="FN" /> </b> <br />
</tr><tr>
<td><b>Enter second number:<td> <input type="text" name="SN"/></b> <br />
</tr><tr>
<td><input type= "submit" name="submit" value="PROCEED TO TABLE" />
</tr></table>
</form>
</div>
<div id="footer" style="background-color:#A9A9A9;clear:both;text-align:center;"> By: Rachelle Viado</div>
</div>
</body>
</html>
numberPick.php
<html>
<head><title>Labexam_viado</title></head>
<body>
<?PHP echo "<table border=8 cellpadding=16>"; $first=$_POST['FN']; $second=$_POST['SN']; $i=1; $j=2; for ($i = 1; $i <= $first; $i++ ) { if($i%2!=0){ echo "<tr>"; echo '<form action="results.php" method="Post">'; echo '<td ><input type="submit" name="1" value= "'.$i.'"/></td>'; for ( $j = 2; $j <= $second; $j++ ) { if($j%2!=0){ echo '<form action="results.php" method="Post">'; echo '<td ><input type="submit" name="2" value= "'.$i * $j.'"/></td>'; } } echo "</tr>"; } } echo "</table>";
?>
</form>
</body>
</html>