">
赞
踩
HTML源码如下:test1.html
- <html>
- <meta http-equiv="Content-Type" charset=utf-8/>
-
- <body>
- <h1>Web安全</h1>
- <form action="test1.php" method="post">
- 姓名:<input type="text" name="name"><br>
- 邮箱:<input type="text" name="email"><br>
- <input type="submit" value="点我提交">
- <input type="button" value="重新填写">
- </form>
- </body>
- <html>
- <body>
-
- <?php
- if(empty($_POST["name"])){
- header("refresh:3;url=http://websecurity.163.com/exam/test1.html"); print('请补全信息,3S跳转...<br>');}
- else{echo $_POST["name"]; ?>,欢迎您!<br>
- 您的邮箱地址是: <?php echo $_POST["email"];}
- ?>
-
- </body>
- </html>
当什么都没填的时候:
当填写了数据后:
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。