我有一个从index.php查询的搜索页面示例:http://localhost/sgc/admin/index.php?page=search
然后,我在此页面中创建了一个表单,用于按名称搜索用户
<form role="form" method="get" action="" class="form-horizontal">
<input type="search" name="name" class="form-control" placeholder="username">
</form>问题是,当提交输入时,它会重定向到index.php,并将参数添加到索引页面http://localhost/sgc/admin/index.php?name=
所需的URL格式为http://localhost/sgc/admin/index.php?page=search&name=
可以使用php实现吗?还是必须使用javascript?
谢谢,并为我糟糕的英语道歉:)
发布于 2014-09-18 08:08:45
尝试:
提交后:您的url : ttp://localhost/sgc/admin/index.php?page=search&name=YOUR_STRING
https://stackoverflow.com/questions/25901662
复制相似问题