kts Posted November 18, 2008 Share Posted November 18, 2008 I have a form using GET to send and the Submit=Search is showing.... there a way to exclude certain variables from being put on the url? Link to comment https://forums.phpfreaks.com/topic/133153-form-using-get-question/ Share on other sites More sharing options...
cooldude832 Posted November 18, 2008 Share Posted November 18, 2008 can we see the form Link to comment https://forums.phpfreaks.com/topic/133153-form-using-get-question/#findComment-692538 Share on other sites More sharing options...
kts Posted November 18, 2008 Author Share Posted November 18, 2008 sorry: <form name="form1" method="get" action="search.php"> <div align="center"> <br> <input type="text" name="keywords" id="keywords"> <select name="type" id="type"> <option value="State" <?php if($stype == "State"){?>selected<?php }?>>By State</option> <option value="ZIP" <?php if($stype == "ZIP"){?>selected<?php }?>>By Postal Code</option> <option value="City" <?php if($stype == "City"){?>selected<?php }?>>By City</option> <option value="Pname" <?php if($stype == "Pname"){?>selected<?php }?>>By Provider</option> </select> <input type="submit" name="search"> </div> </form> and the url looks like search.php?keywords=&type=State&search=Submit+Query Link to comment https://forums.phpfreaks.com/topic/133153-form-using-get-question/#findComment-692539 Share on other sites More sharing options...
cooldude832 Posted November 18, 2008 Share Posted November 18, 2008 by naming an input it is usually passed via get (even if the input type seems invalid) change it to <input type="submit" value="search" /> Link to comment https://forums.phpfreaks.com/topic/133153-form-using-get-question/#findComment-692542 Share on other sites More sharing options...
kts Posted November 18, 2008 Author Share Posted November 18, 2008 That did the trick hah, thanks. Thought about it but had the if(isset ont he $search) just fixed it .... cheers! Link to comment https://forums.phpfreaks.com/topic/133153-form-using-get-question/#findComment-692544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.