I need some help or tips on the following.
I have a .sql database file with the folowing structure:
[CODE]
DROP TABLE IF EXISTS `car`;
CREATE TABLE IF NOT EXISTS `car` (
`id` int(10) default NULL,
`Make` text,
`Model` text,
`Year_` text,
`Car_Fuel` text,
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
And here is a sample of the data inserted in to this database:
[CODE]
INSERT INTO `car` (`id`, `Make`, `Model`, `Year_`, `Car_Fuel`) VALUES
(1, ‘Toyota’, ‘4Runner SR5 4×4’, ‘2004’, ‘Gasoline’),
(2, ‘Ford’, ‘Fiesta 1.4’, ‘2003’, ‘Diesel’),
(3, ‘Seat’, ‘4Runner SR5 4×4’, ‘2004’, ‘Diesel’),
(4, ‘Volkswagen 2.0’, ‘Golf’, ‘2008’, ‘Gasoline’),
(5, ‘Nissan’, ‘300z’, ‘2004’, ‘Petrol’),
(6, ‘Ford’, ‘Fiesta 1.8’, ‘2005’, ‘Gasoline’),
(7, ‘Porsche’, ‘356 America’, ‘1952’, ‘Diesel’),
(8, ‘Lancia’, ‘Hit’, ‘1988’, ‘Gasoline’),
And so on… up to 42000 different cars
How would I get around to make auto populating dropdown boxes selecting data from the database in the following order:
First dropdown: Make
Second auto populate: Car_Fuel
Third: Year
And then only show the Models acording to the above.
Thanks beforehand for any help or tips at all, I have done other scripts but on this one I dont know where to start.