第九期-(191118作业)
一、练习post传值
代码:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<form action="" method="post">
<label for="username">用户:</label>
<input type="text" name="username" id="username" placeholder="请输入用户名">
<label for="password">密码:</label>
<input type="password" name="password" id="password" placeholder="请输入密码">
<input type="submit" value="提交">
</form>
</body>
</html>
<?php
print_r($_POST);
echo '<hr>';
echo $_POST['username'];
echo '<br>';
echo $_POST['password'];
?>
运行效果图