Jump to content

Recommended Posts

Hi guys,

I need an urgent help from you profi .

 

Take a look at this:

 

<select name="cat">

                    <option id="opt1">Movie</option>

                    <option id="opt2">Music</option>

                    <option id="opt3">Television</option>

                   

</select>

 

<select name="sub_cat">

                    <option id="s_opt1">Action </option>

                    <option id="s_opt2">Adventure</option>

                    <option id="s_opt3">Thriller</option>

                   

</select>

 

The situation is so,

 

I select movie in first select option , then it should store a variable $catagory and i could be able to search the database to populate the options in second select. That is , the selection of the first one should store a variable which when check in the database can list the subcatagory with the catagory selected, in above case, when movie as cat is selected then the subcat should contain the options with category movie.

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/254800-select-box-help-with-ajax-support/
Share on other sites

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.