rocky_17 Posted December 11, 2010 Share Posted December 11, 2010 Here is Demo http://job.hostdon.co.in/advance_search.php I want to change advance searching option location is show like (country-state-city) but i want to show like Ex: select Country (country list) then select State (state list) Then finally select City and add it to box Here is Code of select menu PHP Code: <tr valign="top"> <td align="right" class="innertablestyle"><font class='normal'><strong>Locations</strong></font></td> <td class="maintext"> </td> <td class="maintext"><font class="smalltext"> <textarea name="location" cols="37" rows="5" readonly="readonly" id="location"><? echo $loc_list;?></textarea> <br> <font class="smalltext"><select name="locs" id="locs" > <option value="0">Choose a location</option> <? $rs_query=mysql_query("select * from sbjbs_locations where sb_pid=0 order by sb_default desc,sb_loc_name"); while($rst=mysql_fetch_array($rs_query)) { // $cat_path=""; /*$child=mysql_fetch_array(mysql_query("select * from sbjbs_locations where sb_pid=".$rst["sb_id"])); if($child) { continue; }*/// $cat_path=$rst["sb_loc_name"]; /* $par=mysql_query("select * from sbjbs_locations where sb_id=".$rst["sb_pid"]); while($parent=mysql_fetch_array($par)) { $cat_path=$parent["sb_loc_name"]."-".$cat_path; $par=mysql_query("select * from sbjbs_locations where sb_id=".$parent["sb_pid"]); }*/ ?> <option value="<? echo $rst["sb_id"];?>" ><? echo $cat_path;?></option> <? loc_order($rst["sb_id"]); } ?> </select></font> <input name="loc_id" type="hidden" id="loc_id" value="<? echo $loc_id_list;?>"> <input name="add2" type="button" id="add2" value="Add" onClick="add_location()"> <input name="Remove2" type="button" id="Remove2" value="Remove" onClick="remove_location()"> </font></td> </tr> $rs_query=mysql_query("select * from sbjbs_locations where sb_pid=0 sb_pid=0 means parent id is 0 its mean its all of countries how can i do it plzz tell me Quote Link to comment https://forums.phpfreaks.com/topic/221316-need-help-urgent-php-add-location-problem/ Share on other sites More sharing options...
fenway Posted December 11, 2010 Share Posted December 11, 2010 Don't mark your posts with "urgent" -- it's against the ToS. And besides, I don't see a question. Quote Link to comment https://forums.phpfreaks.com/topic/221316-need-help-urgent-php-add-location-problem/#findComment-1145898 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.