duanjiao7440 2014-09-17 22:54
浏览 7

使用查询页面将FORM中的参数添加到URL

I have a search page which is queried from index.php example : http://localhost/sgc/admin/index.php?page=search

then i created a form within this page to search users by names

<form role="form" method="get" action="" class="form-horizontal">
<input type="search" name="name" class="form-control" placeholder="username">
</form>

the problem is when the input is submitted it redirects to the index.php and adding the paramteres to the index page http://localhost/sgc/admin/index.php?name=

required URL format is to be http://localhost/sgc/admin/index.php?page=search&name=

can it be achived using php or i have to use javascript

Thanks, and sorry for my bad english :)

  • 写回答

1条回答 默认 最新

  • douzi3756 2014-09-18 00:08
    关注

    try :

    After submision : your url : ttp://localhost/sgc/admin/index.php?page=search&name=YOUR_STRING

    评论

报告相同问题?

悬赏问题

  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失