не могу понять почему прога не запускается?? Code
<html>
<head>
<title>Формы</title>
</head>
<body>
<h1> hi uzer</h1>
<h3>Ajax</h3>
<?
Error_Reporting(E_ALL & ~E_NOTICE);
printGreeting();
printDice();
printForm();
function printGreeting() {
global $guess, $numPetals;
if (empty($guess)) {
print "<h3>Привет эта игра сколько
липестков</h3>";
}else if ($guess == $numPetals) {
print "<h3>Давай играть!</h3>";
}else{//20
print <<<HERE
<h3>form last try:</h3>
Ты гусь:$guess<br><br>
- и коректируй : $numPetals и
угадывай<br>
HERE;
}
}
function printDice()
{//30
global $numPetals;
print "<h3>Крути:</h3>";
$numPetal = 0;
$die1 = rand(1,6);
$die2 = rand(1,6);
$die3 = rand(1,6);
$die4 = rand(1,6);
$die5 = rand(1,6);
showDie($die1);
showDie($die2);//40
showDie($die3);
showDie($die4);
showDie($die5);
print "<br>";
calcNumPetals($die1);
calcNumPetals($die2);
calcNumPetals($die3);
calcNumPetals($die4);
calcNumPetals($die5);
}//50
function showDie ($value) {
print <<<HERE
<img src = "die$value.jpg"
height = 100
width = 100>
HERE;
}
function calcNumPetals ($value) {
global $numPetals;
switch ($value) {
case3;
$numPetals += 2;
break;
case5;
$numPetals += 4;
break;
}
}
function printForm() {
global $numPetals;
print <<<HERE
<h3>бля?</h3>
<form method = "post">
<input tupe = "text"
name = "guess"
value = "0">
<input tupe = "hidden"
name = "numPetals"
value = "$numPetals">
<input tupe = "submit">
</form>
HERE;
}
?>
</body>
</html>