<html>
<head>
<title>2-1.html 입력 폼파일</title>
<meta http-equiv = "content-type" content = "text/html; charset = utf-8">
</head>
<form method = "post" action = "2-1.php">
A : <input type = "text" name = "a"><br>
B : <input type = "text" name = "b"><br>
<input type = "submit" name = "확인" value = "확인">
<input type = "reset" name = "취소" value = "취소"><br>
</form>
</html>
<?
$a = $_POST["a"];
$b = $_POST["b"];
if( $a > $b ) {
echo(" 입력 값중 큰 값은 \$a($a)입니다. ");
}
if( $b > $a ) {
echo(" 입력 값중 큰 값은 \$b($b)입니다. ");
}
if( $a==$b ) {
echo(" 두 입력 값이 동일합니다.. ");
}
?>
'Web > PHP' 카테고리의 다른 글
[Web_PHP] PHP 기초 문법 (0) | 2022.10.14 |
---|