I am having a issue with a search box. When I try to input a city name an click the search button a strange thing happens. I place a city name: Dallas Click search button...NO results show - then I click the search button again and the results for Dallas appear. Now I put in Houston Click search button...NO results show - then I click the search button again and the results for Houston appear. --------Search box code---------- <form action="<?php echo $subcat_url .'?_action='. $_GET['_action'] .'¤t_page=1&location=' .$_GET['city'].'%2C+'. $statename;?>&mi=25" method="get"> <input type="hidden" name="_action" value="getJobs"> <input type="hidden" name="cityid" value="<?php echo $xcityid; ?>"> <input type="hidden" name="lang" value="<?php echo $xlang; ?>"> <input type="hidden" name="location" value="<?php echo $_GET['city'].'%2C+'. $statename; ?>"> <input type="hidden" name="jobtype" value="<?php echo $_GET['search']; ?>"> <input name="search" type="text" size="<?php echo $searchbox_on_top?35:25; ?>" value="<?php echo $_GET['search']; ?>"> ---------- But this link works for current term in search box: <a href="<?php echo $subcat_url .'?_action='. $_GET['_action'] .'¤t_page=1&location=' .$_GET['city'].'%2C+'. $xstatename; ?>">here</a> Thanks for any feedback. Nate
the error seems odd so i'm assuming your logic flow had some sort of glitch, i only scanned what you posted but the one thing the jumps out is the way you specify the form action, looks like you're stuffing so much variable in there
Try changing the request to a POST request instead of a GET: <form action="<?php echo $subcat_url .'?_action='. $_GET['_action'] .'¤t_page=1&location=' .$_GET['city'].'%2C+'. $statename;?>&mi=25" method="POST"> Code (markup):
Thanks for the suggestions...Changed it to post but no luck. The weird part is that this link works so it seems to be pulling the correct info. <a href="<?php echo $subcat_url .'?_action='. $_GET['_action'] .'¤t_page=1&location=' .$_GET['city'].'%2C+'. $xstatename; ?>">here</a>