This "short" code will populate 3 dropdown in each other.
Visit for the source code:
http://sfx.site40.net/ajax3.php
Go to phpmyadmin, and run this query:
DROP TABLE IF EXISTS `location`;
CREATE TABLE IF NOT EXISTS `location` (
`id` int(7) NOT NULL auto_increment,
`loc_code` varchar(255) default NULL,
`loc_abbr` varchar(255) default NULL,
`loc_name` varchar(255) default NULL,
`location_name` varchar(255) default NULL,
`loc_order_name` varchar(255) default NULL,
`flag_disaster` char(1) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
Create index.php, and lets create three dropdown with PHP
\n";
?>
\n";
?>
\n";
?>
/**DO NOT INSERT*/ Lets Use this Javascript, to communicate the .php file called locale.php
/**DO NOT INSERT*/ Open a locale.php, and take these lines.
/**DO NOT INSERT*/ START
\n";
echo "\n";
$result=mysql_db_query($dbname,"select loc_code from location GROUP BY loc_code");
while(list($nomeCategoria)=mysql_fetch_array($result)){
echo " \n" ;
}
} else if ($data=='subcategoria') {
echo "