$name = $email =$gender =$comment = $website ="";
if($_SERVER["REQUEST_METHOD"] == "POST"){
$name = test_input($_POST["name"]);
$email = test_input($_POST["email"]);
$website = test_input($_POST["website"]);
$comment = test_input($_POST["comment"]);
$gender = test_input($_POST["gender"]);
}
function test_input($data){
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
echo "
echo "
";
echo $name;
echo "
";
echo $email;
echo "
";
echo $website;
echo "
";
echo $comment;
echo "
";
echo $gender;
?>
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
input 的email 没有name属性 服务端怎么获取?