<?php
if(isset($_POST['age'])){
$age=$_POST['age'];
if ($age >=18){
echo'可以上网';
} else{
echo '不可以上网';
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="" method="post">
<input type="text" name="age">
<input type="submit" name="">
</form>
</body>
</html>