> <br /><body> <br /><?php <br />$rows = 1; <br />$columns = 1; <br />$cells = 1; <br />?> <br /> <br /><?php $rows = (int) $_POST["totalBaris"]; ?> <br /><?php $columns = (int) $_POST["totalKolom"]; ?> <br /><?php $cells = (int) $_POST["totalSel"]; ?> <br /> <br />You pick <?php echo $rows; ?> rows,<br /> <br />You pick <?php echo $columns; ?> columns,<br /> <br />and you need <?php echo $cells; ?> cells,<br /> <br /><br /><br /> <br /><?php <br />$width = $columns * 75; <br />echo "<table width=".$width." border=1>"; <br />$rw = 0; <br />$cel = 1; <br />while ($rw < $rows && $cel <= $cells) <br />{ <br />echo "<tr>"; <br />$cl = 0; <br />while ($cl < $columns) <br />{ <br />if ($cel <= $cells) <br />{ <br />echo "<td><div align=center>".$cel."</div></td>"; <br />$cel++; <br />} <br />$cl++; <br />} <br />echo "</tr>"; <br />$rw++; <br />} <br />echo "</table>"; <br />?> <br /></body> <br /> <br /><body> <br /><form method="post" action="GenerateSel.php"> <br /><p><font face="Bauhaus 93" color="#FF0000" size="5"><strong>GENERATE SEL TABEL</strong></font><br></p> <br /><table width="277" border="0"> <br /><tr> <br /><td width="89">Jumlah Baris</td> <br /><td width="172"><strong>: </strong><input name="totalBaris" type="text" id="totalBaris" onKeyUp="getmax();" onfocus="this.select();"></td> <br /></tr> <br /><tr> <br /><td><label>Jumlah Kolom</label></td> <br /><td><strong>: </strong><input name="totalKolom" type="text" id="totalKolom" onKeyUp="getmax();" onfocus="this.select();"></td> <br /></tr> <br /><tr> <br /><td>Jumlah Sel</td> <br /><td><strong>: </strong><input name="totalSel" type="text" id="totalSel" onKeyUp="getmax();" onFocus="this.select();"></td> <br /></tr> <br /><tr> <br /><td>Sel Maksimal</td> <br /><td><strong>: </strong><input name="jmlSelMax" type="text" id="jmlSelMax" readonly="true" style="background-color:#999999"> <br /></td> <br /></tr> <br /><tr> <br /><td> <br /><div align="center"> <br /><br /> <br /><input type="reset" name="Reset" value="Reset"> <br /></div></td> <br /><td> <br /><div align="right"> <br /><br /> <br /><input type="submit" name="Generate" value="Generate"> <br /></div></td> <br /></tr> <br /></table> <br /></form> <br /><body> <br /><form method="post" action="GenerateSel.php"> <br /><p><font face="Bauhaus 93" color="#FF0000" size="5"><strong>GENERATE SEL TABEL</strong></font><br></p> <br /><table width="277" border="0"> <br /><tr> <br /><td width="89">Jumlah Baris</td> <br /><td width="172"><strong>: </strong><input name="totalBaris" type="text" id="totalBaris" onKeyUp="getmax();" onfocus="this.select();"></td> <br /></tr> <br /><tr> <br /><td><label>Jumlah Kolom</label></td> <br /><td><strong>: </strong><input name="totalKolom" type="text" id="totalKolom" onKeyUp="getmax();" onfocus="this.select();"></td> <br /></tr> <br /><tr> <br /><td>Jumlah Sel</td> <br /><td><strong>: </strong><input name="totalSel" type="text" id="totalSel" onKeyUp="getmax();" onFocus="this.select();"></td> <br /></tr> <br /><tr> <br /><td>Sel Maksimal</td> <br /><td><strong>: </strong><input name="jmlSelMax" type="text" id="jmlSelMax" readonly="true" style="background-color:#999999"> <br /></td> <br /></tr> <br /><tr> <br /><td> <br /><div align="center"> <br /><br /> <br /><input type="reset" name="Reset" value="Reset"> <br /></div></td> <br /><td> <br /><div align="right"> <br /><br /> <br /><input type="submit" name="Generate" value="Generate"> <br /></div></td> <br /></tr> <br /></table> <br /></form> <br />
0 comments to “Membuat Generate Sel Tabel menggunakan HTML n PHP Script”
0 comments to “Membuat Generate Sel Tabel menggunakan HTML n PHP Script”