Created
June 27, 2025 12:21
-
-
Save ichsanputr/d5c64bf554109ddcea6030b2d1680379 to your computer and use it in GitHub Desktop.
a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($_POST) { | |
$이름 = trim($_POST['name']); | |
$이메일 = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL); | |
$나이 = (int)$_POST['age']; | |
$성별 = $_POST['gender'] ?? '미지정'; | |
// 유효성 검사 | |
if (empty($이름)) { | |
echo "이름을 입력해주세요."; | |
} elseif (!$이메일) { | |
echo "올바른 이메일을 입력해주세요."; | |
} else { | |
echo "환영합니다, $이름님! ($이메일)"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment