Пишу игру "Угадай число". Создал цикл. А он бесконечный. Почемуууу?
$x = range(1, 10);
$y = array_rand($x);
if(!isset($_REQUEST['q'])) {
echo "<form action=\"http://localhost/test.php\" method=\"post\">".
"<input type=\"text\" name=\"qwerty\">"."<input type=\"submit\" name=\"q\">".
"</form>";
die();
}
$z = $_REQUEST['qwerty'];
while(!($z === $y)) {
if($z > $y) {
$text = "Less";
} else $text = "Better";
echo "<form action=\"http://localhost/test.php\" method=\"post\">".
"<input type=\"text\" name=\"qwerty\">"."<input type=\"submit\" name=\"q\">".
"$text"."</form>";
$z = $_REQUEST['qwerty'];
}
echo "Yes";