入门新手学的调用
从A网页输入你的用户名,留言内容,提交后从B网页显示
从A网页输入你的用户名,留言内容,提交后从B网页显示
<html> <head> <title> 留言本首页</title> <body> <h1>Hello,Welcome to imchaotan 留言本</h1><br /> <h3>有什么想说说吗?</h3> <table align="center" vspace=80 > <form method="post" action="post.php"> <tr> <td>账户:</td> <td><input type="text" name="id" /></td> </tr> <tr> <td>想说点什么?</td> <td><input type="text" name="guess" size="60" /></td> </tr> <tr> <td><input type="submit" value="提交" /></td> <td><input type="reset" value="重置" /></td> </tr> </form> </table> </body> </head> </html>
2. [文件] post.php ~ 441B 下载(21) 跳至 [1] [2] [全屏预览]
<? if(empty($_POST['id'])) { echo "账户不能为空,5秒后自动返回登录界面"; header("refresh:5;URL='index.htm'"); } elseif(empty($_POST['guess'])) { echo "文本不能为空,5秒后自动返回登录页面"; header("refresh:5;URL='index.htm'"); } else { $id=$_POST['id']; $guess=$_POST['guess']; echo"Hello".$id."你想对潮叹潮城网说".$guess."<br />"; } ?>
精彩图集
精彩文章