PhpRiot

Listing 2268

Submitted by anonymous user, 22 June 2009
<?
$coins= strip_tags($_POST[coins]);
$i=0;
 
 
if ($coins>=51)
{
    echo "choose a number lower than 50";
exit;
}
 
if ($coins<=0)
{
    echo "you need to choose a better number than $coins";
exit;
}
 
while($i<$coins)
{
$flip = rand(1,2);
 
if ($flip=="1")
    echo "<img src='images/heads.jpg' alt='heads!' title='heads!'><br/>";
elseif ($flip=="2")
    echo "<img src='images/tails.jpg' alt='tails!' title='tails!'><br/>";
else 
    echo "error, numbers only.";
$i++;
}
 
?>
Submit a Follow Up

Followups: