Jump to content

3 x drop down & dynamic query results


brissy_matty

Recommended Posts

Hi am looking for some help with some dynamic lists & queries.

 

I am trying to get 3 dynamic drop down which are taken from a mysql database - that part not so hard to do.  what i want to happen is for a query to execute via PHP/mysql to collect the data based on the selections of these 3 listboxes & display directly underneath.

 

Basically the first selectbox will contain hard coded values indicating a location/town

 

then next listbox will display a list of events based on the selection of the first

 

the third will display the date & time based on the selection of the first & second.

 

 

a query would display full details of the event underneath based on the above.  I can do this using PHP only however am really interested in the AJAX method as it updates the data either as changes are made or after all changes are made without the need to submitt a form each time.  (Silently reloads data).

 

If anyone knows of an good examples of something like this or has something could you please let me know.  I have looked through alot of examples and nothing really does this.  I found ones that displayed files using javascript. I found ones that could work with one select box.  but i am yet to find a dynamic query / result type form.

 

Cheers

Matt

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

This is very much like what I am working on now. I am trying to create a web-based interface to query a mysql database to sort transactions based on multiple options.

 

Thus far, I can select an option from the first list to populate the second drop-down list; however, when I select the option from the second list, the entire page is reset and I have to reselect the first menu option.

 

Any help would be greatly apprciated.

 

 

Link to comment
Share on other sites

  • 5 weeks later...

It is loading the second select box however when I make a selection from the second to populate the third the page does a refresh. I'm sure it is doing a refresh on the first selection too though, so I guess my question is how do use AJAX to make it not refresh the entire page? I've done several of the tutorials but I can't seem to wrap my head around it.

 

Thanks for your help  ???

Link to comment
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.