我有一个小问题。我有一个表单,用于搜索。提交此表单后不能保持在同一页面上。PHP/HTML表单动作属性
我的网址:
www.localhost/index.php的vehicletype =车
此URL,汽车搜索是可见的。
后提交我得到这样的:
本地主机/ index.php的body_type =任何& fuel_type .....
但我想这一点,
www.localhost/index.php?vehicletype = car?body_type = any & fuel_type ....
我试过$_SERVER["REQUEST_URI"]
但没有。感谢您的帮助,并感谢我的英语语法!
编辑:代码:
<? if($_GET['vehicletype']=='car'){ ?>
<div class="search">
<form method="get" action="">
....
<button class="btn btn-search" type="submit">Search <hr> (658 found)</button>
</form>
</div>
更好地显示您使用的PHP代码 – RiggsFolly
请显示您的代码 – kerv