get.php
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div>GET test</div>
<form action="get_result.php" method="get">
<input type="text" name="id" placeholder="Enter id here">
<input type="text" name="age" placeholder="Enter age here">
<input type="submit" value="Submit">
</form>
</body>
</html>
get_result.php
<?php
$id = $_GET['id'];
$age = $_GET['age'];
if(!$id)
{
echo "<script>alert('로그인 후 이용해주세요.');window.close();</script>";
exit;
}
?>
<!DOCTYPE html>
<html>
<head></head>
<body>
<p>ID: <?php echo $id; ?></p>
<p>Age: <?php echo $age; ?></p>
</body>
</html>