关于add.php到index.php中跳转的问题
<?php header('content-type:text/html;charset=utf-8'); ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/jquery-2.0.0.min.js"></script> <script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/jquery-ui"></script> <link href="http://www.francescomalagrino.com/BootstrapPageGenerator/3/css/bootstrap-combined.min.css" rel="stylesheet" media="screen"> <script type="text/javascript" src="http://www.francescomalagrino.com/BootstrapPageGenerator/3/js/bootstrap.min.js"></script> <style type="text/css"> .div1{ padding-left: 250px; } </style> </head> <body> <div class="container-fluid"> <div class="row-fluid"> <div class="span12"> <div class="page-header"> <h1> 自制留言板<small>v1.0.1</small> </h1> </div> </div> </div> <div class="row-fluid"> <div class="span12"> <div class="hero-unit"> <h1> Hello, world! </h1> <p> 这是一个可视化布局模板, 你可以点击模板里的文字进行修改, 也可以通过点击弹出的编辑框进行富文本修改. 拖动区块能实现排序. </p> <p> <a rel="nofollow" class="btn btn-primary btn-large" href="#">查看更多 »</a> </p> </div> <form action="index.php" method="post" > <fieldset> <legend>发布</legend> <div class="div1"> <label>用户名</label><input type="text" name="username" style="width:500px;height:20px" /> <label>标题</label><input type="text" name="title" style="width:500px;height:20px" /> <label>内容</label><textarea type="text" name="content" style="width:500px;height:100px"></textarea> <hr> <input type="submit" class="btn btn-primary" name="sub" value="发布留言"/> <input type="submit" class="btn" name="sub1" value="查看留言"/> </div> </fieldset> </form> </div> </div> </div> </body> </html>
这是add.php的代码,请问如何实现留言成功并且跳转到index.php中??还有如何判断用户点击发布留言还是查看留言
0
收起
正在回答 回答被采纳积分+1
1回答
PHP小白零基础入门
- 参与学习 人
- 提交作业 626 份
- 解答问题 4928 个
想要学好Web后端开发的中流砥柱语言,本阶段为你轻松铺就扎实的基础,从前端网页布局的搭建到后台PHP开发,助你从零基础到掌握主流开发语言。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星