<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form action='try.php' method='post'>
<input type='submit' name='bigger' value='По-голямо или равно на 50'>
<input type='submit' name='smaller' value='По-малко от 50'>
</form>
<?php
if(isset($_POST['bigger'])){
$chosen=$_POST['bigger'];
$rand=rand(1,100);
if($rand>=50 && $chosen){
echo $rand."<br/>";
echo " Позна!";
}
else {echo $rand;echo "<br/> Съжалявам, не позна!";}
}
if(isset($_POST['smaller'])){
$chosen2=$_POST['smaller'];
$rand=rand(1,100);
if($rand<50 && $chosen2){
echo $rand."<br/>";
echo " Позна!";
}
else {echo $rand; echo "<br/> Съжалявам, не позна!";}
}
?>
</body>
</html>