Jump to content

Recommended Posts

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.