New theme

less than 1 minute read

Haven't posted in awhile, but I needed to find a new theme which will allow for posting code. If anyone knows of any, feel free to let me know. I'll just test around here.

<?
function slotnumber()
{
  srand(time());
    for ($i=0; $i < 3; $i++)
    {
      $random = (rand()%3);
      $slot[] = $random;
    }
  print("<td width="\"33%\"><center>$slot[0]</center></td>");
  print("<td width="\"33%\"><center>$slot[1]</center></td>");
  print("<td width="\"33%\"><center>$slot[2]</center></td>");
    if($slot[0] == $slot[1] && $slot[0] == $slot[2])
    {
      print("Winner! -- Hit refresh on your browser to play again");
      exit;
    }
}
?>

<div align="center"><center>
<table border="1" width="50%">
<tr>

<?
slotnumber();
?>

</tr><tr>
<td width="100%" colspan="3" bgcolor="#008080">
<form method="POST" action="example13.php3">
<div align="center"><center><p><input type="submit" value="Spin!" />
</p></center></div>
</form>
</td></tr>
</table></center></div>

Tags:

Categories:

Updated:

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading...