Jump to content

How to select database from drop down selection


m2244

Recommended Posts

Hello,

 

I am trying to create a web based tool for use around the office. What this needs to do is present a drop down menu with, at this time, 2 choices. The choice selected determines the proper database to query. I am not sure how to do this at all.

 

Not sure if I need to use JS (which I use a lot) or AJAX (which I am not familiar with). Can anyone get me going in a direction here?

Link to comment
Share on other sites

in this section what you want to change by change the database ,like for some time or for particular user or particular page what is the purpuse of this..?

 

Well, when a user here in the office (internal use only) hits this page they will need to select, from a drop down menu, one of two choices. These choices correspond to one of two databases. So they make this choice, enter some other information or not and hit a 'Search' button, this will show them the matching data from the correct database.

Link to comment
Share on other sites

Are you looking to keep this on the client side (JavaScript/AJAX)?

 

If not, you could build a simple drop down menu in HTML and process the selection with PHP. The following tutorial may help:

http://www.html-form-guide.com/php-form/php-form-select.html

 

Thanks for the help. this helps. The thing is that I need to populate another drop down based on the user's first selection. I guess this is the real challenge for me.

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.