get传值练习:
实例<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>get传值练习</title>
</head>
<body>
<form action="/1115/php/login.php" method="GET">
<div>
<label for="name">用户名:</label>
<input type="text" name="name" id="name">
</div>
<div>
<label for="pas">密码:</label>
<input type="text" name="password" id="pas">
</div>
<input type="submit" value="登录">
</form>
</body>
</html>
php部分:
<?php
echo '账号:'. $_GET['name'];
echo '<hr>';
echo '密码:'.$_GET['password'];
?>
运行实例 »点击 "运行实例" 按钮查看在线实例
手写: