<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <form method="POST" action="08-formData.php"> <p>姓名:<input type="text" name="username"></p> <p>密码:<input type="text" name="password"></p> <button type="submit">提交</button> </form> </body> </html> <?php //将上个页面的表单中的字段的value值,提取出来 $username = $_POST[‘username‘]; $password = $_POST[‘password‘]; echo $username."你好,您的密码是".$password; ?>
时间: 2024-10-09 10:06:50