<?
session_start();
if (!$_SESSION["tikTakTo"]) {
$_SESSION["tikTakTo"][0] = " ";
$_SESSION["tikTakTo"][1] = " ";
$_SESSION["tikTakTo"][2] = " ";
$_SESSION["tikTakTo"][3] = " ";
$_SESSION["tikTakTo"][4] = " ";
$_SESSION["tikTakTo"][5] = " ";
$_SESSION["tikTakTo"][6] = " ";
$_SESSION["tikTakTo"][7] = " ";
$_SESSION["tikTakTo"][8] = " ";
}
if ($_POST) {
for ($i=0; $i<9; $i++) {
$btn = "btn$i";
if ($_POST["$btn"]) {
$_SESSION["tikTakTo"][$i] = $_POST["$btn"];
}
else {
// $_SESSION["tikTakTo"][$i] = " ";
}
}
$_SESSION["tikTakTo"];
}
?>
<form method="POST" action="sos.php">
<table width="550" height="400" border="1" align="center" cellpadding="0" cellspacing="2">
<tr valign="top">
<td>
<table width="400" height="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#999999">
<tr align="center" bgcolor="#006699">
<td colspan="3" bgcolor="#006699"><font color="#FFFFFF" size="5" face="Times New Roman, Times, serif"><strong>S
O S</strong></font></td>
</tr>
<?php
$i=0;
$tikTakTo = $_SESSION["tikTakTo"];
while($i<9){?>
<tr align="center" valign="middle">
<td width="33%"> <strong><font color="#CC0000" size="3" face="Arial, Helvetica, sans-serif"> <?php echo $tikTakTo[$i];?></font></strong></td>
<td width="33%"><strong><font color="#CC0000" size="3" face="Arial, Helvetica, sans-serif"> <? echo $tikTakTo[$i+1] ; ?></font></strong></td>
<td width="33%"><strong><font color="#CC0000" size="3" face="Arial, Helvetica, sans-serif"> <? echo $tikTakTo[$i+2] ; ?></font></strong></td>
</tr>
<?php
$i+=3;
}
?>
</table></td>
<td width="150" bgcolor="#006699"><table width="150" height="298" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom"><table width="150" height="100" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#000033">
<tr align="center" valign="middle">
<td width="33%" bgcolor="#CCCCCC"> <input name="btn0" type="submit" id="degerx" value="X">
<input name="btn0" type="submit" id="o111" value="O">
</td>
<td width="33%"> <input name="btn1" type="submit" id="x1" value="X">
<input name="btn1" type="submit" id="o1" value="O"></td>
<td width="33%" bgcolor="#CCCCCC"> <input name="btn2" type="submit" id="x2" value="X">
<input name="btn2" type="submit" id="o2" value="O"></td>
</tr>
<tr align="center" valign="middle">
<td width="33%"> <input name="btn3" type="submit" id="x3" value="X">
<input name="btn3" type="submit" id="o3" value="O"></td>
<td width="33%" bgcolor="#CCCCCC"> <input name="btn4" type="submit" id="x4" value="X">
<input name="btn4" type="submit" id="o4" value="O"></td>
<td width="33%"> <input name="btn5" type="submit" id="x5" value="X">
<input name="btn5" type="submit" id="o5" value="O"></td>
</tr>
<tr align="center" valign="middle">
<td width="33%" bgcolor="#CCCCCC"> <input name="btn6" type="submit" id="x6" value="X">
<input name="btn6" type="submit" id="o6" value="O"></td>
<td width="33%"> <input name="btn7" type="submit" id="x7" value="X">
<input name="btn7" type="submit" id="o7" value="O"></td>
<td width="33%" bgcolor="#CCCCCC"> <input name="btn8" type="submit" id="x8" value="X">
<input name="btn8" type="submit" id="o8" value="O"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</form>