Kamis, 17 Maret 2011

Tugas Praktikum Web 06

.

Di modul keenam ini kita mempelajari cara membuat web desain menggunakan bahasa php, berikut tugas yang tercantum pada modul enam :
 Tampilan visual dari output :



Berikut adalah source code dari tampilan di atas :

<!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

$html = '<html>
         <head>
         <title>php tabel generated</title>
         </head>
      
         <body>
         <form method="post">
             <p> <strong>CEL count : </strong>
                <input name="cel" type="text" value="10" /></p>
             <p> <strong>COL count : </strong>
                <input name="col" type="text" value="4" /></p>
             <p> <input type="submit" name="click" value="Generate" /></p>
         </form>';

$clicked = $_POST['click'];
if (isset($clicked)) {
    $cel = (int) $_POST['cel'];
    $col = (int) $_POST['col'];
  
    $html.= '<table border="1px" cellspacing="0">
             <tr>';
    for ($count=1; $count<=$cel; $count++) {
            $html.= '<td width=\"50\" height=\"50\">
                     <div align="center">'.$count.'</div>
                     </td>';
            if ($count % $col == 0) $html.= '</tr><tr>';
    }
    $html.= '</tr>
             </table>';
}

$html.= '</body>
         </html>';

echo $html;

?>
</body>
</html>

1 comment

ibrahiemtagle mengatakan...

Casinos Near DC - Mapyro
Casinos near DC. 김해 출장샵 Search 태백 출장안마 for Casinos Near DC, NV near me. 시흥 출장마사지 List of 사천 출장안마 casinos 대전광역 출장안마 and other gaming facilities located near DC, NV.

:a: :b: :c: :d: :e: :f: :g: :h: :i: :j: :k: :l: :m: :n:

Posting Komentar

 




THX FOR VISITING MY BLOG