Correction status:qualified
Teacher's comments:写得比较简洁
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <form action="" method="post"> 用户名 :<input type="text" name="username" value="<?php echo $_POST['username']??'';?>"><br> 密码 : <input type="password" name="password" value="<?php echo $_POST['password']??'';?>"><br> <button type="submit">提交</button> </form> <?php echo $_POST['username']??'';?> <?php echo $_POST['password']??'';?> </body> </html>
点击 "运行实例" 按钮查看在线实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <form action="" method="get"> 用户名 :<input type="text" name="username" value="<?php echo $_GET['username']??'';?>"><br> 密码 : <input type="password" name="password" value="<?php echo $_GET['password']??'';?>"><br> <button type="submit">提交</button> </form> <?php echo $_GET['username']??'';?> <?php echo $_GET['password']??'';?> </body> </html>
点击 "运行实例" 按钮查看在线实例