вот сколько лепестков у розы: " . $numpetals;
function printgreeting() {
global $guess, $numpetals;
$guess = $_POST["guess"];
$numpetals = $_POST["numpetals"];
//эначения из скрытых полей для вывода предыдущей картинки
$d1 = $_POST["dice1"];
$d2 = $_POST["dice2"];
$d3 = $_POST["dice3"];
$d4 = $_POST["dice4"];
$d5 = $_POST["dice5"];
if (is_numeric($guess) == FALSE and strlen($guess) != 0) {
print <<вы ввели не числовое значение!
HERE;
} else {
if (strlen($guess) == 0) {
print <<Добро пожаловать в игру "Сколько лепестков у розы?"
HERE;
} else if ($guess == $numpetals) {
print <<Поздравляем! Вы правы!
Количество лепестков розы равно $numpetals!!!
Ваш предыдущий бросок:
HERE;
showdice($d1);
showdice($d2);
showdice($d3);
showdice($d4);
showdice($d5);
} else {
print <<Ваше предположение НЕВЕРНО.
Вы ввели число $guess.
На самом деле лепестков у розы: $numpetals
Ваш предыдущий бросок:
HERE;
showdice($d1);
showdice($d2);
showdice($d3);
showdice($d4);
showdice($d5);
}
}
}
function printdice() {
global $numpetals, $dice1, $dice2, $dice3, $dice4, $dice5;
print"