Skip to content

tgs modul 1 PHP

March 16, 2011

<!–DOCTYPE html>
Tabel <span class=”hiddenSpellError” pre=”Tabel “>Dinamik</span>
<style type=”text/css”>
.style1 {
color: #000000;
font-family: arial;
font-weight: bold;

<body bgcolor=”#0066FF”>
Tabel Dinamik

$html = ‘<html>
<span class=”hiddenSpellError” pre=””>php</span> tabel generated

<form method=”post”>
<p> <strong>CEL count : </strong>
<input name=”cel” type=”text” value=”” /></p>
<p> <strong>COL count : </strong>
col” type=”text” value=”” /> 
<p> <input type=”submit” name=”click” value=”Generate” /></p>

$clicked = $_POST[‘click’];
if (isset($clicked)) {
$cel = (int) $_POST[‘cel’];
$col = (int) $_POST[‘col’];

$html.= ‘<table border=”1px” cellspacing=”0″>
for ($count=1; $count<=$cel; $count++) {
$html.= ‘<td width=\”60\” height=\”60\”>
<div align=”center”>’.$count.'</div>
if ($count % $col == 0) $html.= ”;
$html.= ‘</tr>

$html.= ‘</body>

echo $html;


No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: