用户登录练习

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
</head>
<body>
<div style=" padding:10px; height: 600px; width: 800px; background-color: orange; margin: 0 auto; border: 1px green solid;">
<h1 style="text-align: center;">用户登录</h1>
<ul style="list-style: none; line-height: 40px;">
<form action="" method="get" style=" text-align: left;">
<li>用户名:<input type="text" name="userName" required="required"></li>
<li>密&nbsp;&nbsp;&nbsp;码:<input type="password" name="password"  required="required"></li>
<li>性别:<label><input type="radio" name="sex" checked="true" value="man">男</label><label><input type="radio" name="sex" value="woman">女</label></li>
<li>爱好:<label><input type="checkbox" name="aihao[]" value="youyong">游泳</label>
<label><input type="checkbox" name="aihao[]" value="lanqiu">篮球</label>
<label><input type="checkbox" name="aihao[]" value="ticao">体操</label></li>
<li>上传头像:<input type="file" name="picpath"></li>
<li>
证件类型:<select name="idcard" value="无">
<option value="身份证">身份证</option>
<option value="驾驶证">驾驶证</option>
</select>
</li>

<li><input type="hidden" name="hide" value="message in hidden"></li>
<li>自我评价:<br><textarea rows="10" cols="30" value="" name="pj"></textarea></li>
<li><input type="submit" name=""><input type="reset" name=""><input type="button" name="" value="注册"></li>
</form>
</ul>

</div>


</body>
</html>
<?php 
if($_GET!=null){
echo "用户名:".$_GET['userName']."<br>";
echo "密码:".$_GET['userName']."<br>";
echo "性别:".$_GET['sex']."<br>";
echo "爱好:";
foreach ($_GET['aihao'] as $value) {
echo $value;
echo "&nbsp;";

}

echo "<br>";
echo "头像:".$_GET['picpath']."<br>";
echo "证件:".$_GET['idcard']."<br>";
echo "隐藏:".$_GET['hide']."<br>";
echo "自我评价:".$_GET['pj']."<br>";
}else{

};
?>

猜你喜欢

转载自blog.csdn.net/liu709127859/article/details/80242607