Jump to content

Multiple menus with accessing database table and onSelect


Xtremer360

Recommended Posts

Okay I have a table called shows and I have two types of shows called Weekly Show and PPV. Both types (option) are in a drop down select box. What I want to happen is when the user chooses Weekly Show it goes to the database shows table and looks under the type field and searches all the records with the types as Weekly Show and gathers their show names. and places those in another drop down select box. The same is done for the PPV in the same second drop down select box. And when one of those show names is selected then it goes back to the database show table and finds all the records with that showname and looks at the fields beside it in the table and finds the highest number and then adds 1 to the number and places that number in the input field

 

The form is found at kansasoutlawwrestling.com/backstage/setupshow.php

Link to comment
Share on other sites

OK, if you have not used AJAX before, you'll need to learn it before something like this. It's not as simple as just throwing in a JS function that will do what you want. I'll give you an idea of how AJAX works. There are two ways that AJAX can work for you. The both start the same, by calling a JS function. That function will call a PHP file that you can pass variables to if you want. Then the two different ways are that the PHP file can either return HTML or JS code. If it returns HTML, you simply use the innerHTML tool to put that HTML where you want. If it returns JS, you use the JS eval() function to run that code.

 

I suggest you go through some tutorials and learn how to use AJAX. Then if you still have trouble with what you're trying to do here, re-post and you'll get help.

 

Without you learning at lease some AJAX, I won't be able to help you now without simply writing your program for you.

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.