Achieve results
The PHP implementation code is as follows:
<! DOCTYPE html>
<meta name= "" content= "" charset= "Utf-8"/>
<body>
<?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;
}
?>
<form method= "POST" action= "<?php Echo htmlspecialchars ($_server[" php_self "]);? > ">
Name: <input type= "text" name= "name" >
<br><br>
Gender:
<input type= "Radio" name= "Gender" value= "female" > Women
<input type= "Radio" name= "Gender" value= "male" > Male
<br><br>
Qq:<input type= "text" name= "email" >
<br><br>
Tel: <input type= "text" name= "website" >
<br><br>
Comments: <textarea name= "comment" rows= "5" cols= "></textarea>"
<br><br>
<br><br>
<input type= "submitted" name= "submit" value= "Submission" >
</form>
<?php
echo "Echo ' welcome: '. $name;
echo "<br>";
Echo ' Your sex is: '. $gender;
echo "<br>";
Echo ' Your QQ is: '. $email;
echo "<br>";
Echo ' Your phone is: '. $website;
echo "<br>";
Echo ' Your comment is: '. $comment;
?>
</body>
PHP registration interface, implementation of the PHP welcome User login Interface