Help with drop downmenu!

d0dsky

New Member
Messages
16
Reaction score
0
Points
0
Hello guys! here I am again!

I've done my system working, now I have a problem with this approached.
query.png


somebody help me what script I would use to populate the content of the second drop down menu with mysql query, to be available when I select some Artist name from the first drop down menu.

the content of the second drop down menu should be the list of the album of an artist I select from the first drop down menu!

edit:
Here is my Table Structure!
Code:
-- --------------------------------------------------------

--
-- Table structure for table `album_tb`
--

CREATE TABLE IF NOT EXISTS `album_tb` (
  `album_sysid` int(11) NOT NULL auto_increment,
  `album_artist` varchar(50) NOT NULL,
  `album_name` varchar(100) NOT NULL,
  `album_year` varchar(50) NOT NULL,
  `created_by` varchar(50) NOT NULL,
  `published_by` varchar(50) NOT NULL,
  `date_created` varchar(20) NOT NULL,
  `date_published` varchar(20) NOT NULL,
  `date_updated` varchar(20) NOT NULL,
  `updated_by` varchar(50) NOT NULL,
  `published` varchar(1) NOT NULL default 'N',
  PRIMARY KEY  (`album_sysid`),
  UNIQUE KEY `album_name` (`album_name`),
  UNIQUE KEY `album_name_2` (`album_name`),
  UNIQUE KEY `album_name_3` (`album_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=37 ;



--
-- Table structure for table `artist_tb`
--

CREATE TABLE IF NOT EXISTS `artist_tb` (
  `artist_sysid` int(11) NOT NULL auto_increment,
  `artist_name` varchar(50) NOT NULL,
  `created_by` varchar(50) NOT NULL,
  `published_by` varchar(50) NOT NULL,
  `date_created` varchar(20) NOT NULL,
  `date_published` varchar(20) NOT NULL,
  `date_updated` varchar(20) NOT NULL,
  `updated_by` varchar(50) NOT NULL,
  `published` varchar(1) NOT NULL default 'N',
  PRIMARY KEY  (`artist_sysid`),
  UNIQUE KEY `artist_name` (`artist_name`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=48 ;



please help me!

Thank you very much!
 
Last edited:

kbjradmin

New Member
Messages
512
Reaction score
2
Points
0
being you need to populate the second drop-down based on the value of the first, you are probably going to need to use ajax. the ajax is going to need to request a small php script to make the second mysql query and return the data back to the client. do you have any experience with ajax?
 
Top