实现效果如图:
php实现代码如下:
// define variables and set to empty values
$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;
}
?>
注册评论界面
">姓名:
性别:
女性
男性
qq:
电话:
评论:
echo "
欢迎您注册登录:
";echo ‘欢迎:‘ . $name;
echo "
";
echo ‘你的性别是:‘ .$gender;
echo "
";
echo ‘你的qq是:‘ .$email;
echo "
";
echo ‘你的电话是:‘ .$website;
echo "
";
echo ‘你的评论是:‘ .$comment;
?>
原文:https://www.cnblogs.com/taoda/p/9363170.html