Welcome to the dice game!
";
$s=0;
for($c=1; $c<=7; $c+=1) {
$d= rand(1,6);
echo "$d ";
if ($d==6) $s=$s+1;
}
echo "
";
echo "
You rolled $s six(es)!";
}
$firsttime=1;
if((isset($_POST['submit'])) or ($firsttime==1))
{
dice_game();
$firsttime=0;
}
?>