for.php

Source of for.php

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>forBreak</title>
</head>
<body>
<h1>Dice Rolling Game 2</h1>
<p>Welcome to the dice rolling game. See how many rolls it takes to get a six!</p>
<p>
<?php
$sixCount = 0;

for ($i = 0; $i < 100; $i++){
	$userNumber = rand(1,6);
	print "<img src=\"die$userNumber.png\" />";
	if($userNumber == 6){
	    $sixCount++;
	}
}

	print "</p><p>You rolled $sixCount six(es)!</p>";
?>

<p><a href="for.php">Try Again!</a></p>

</body>
</html>