ajax +php secondary linkage menu code
php processing code
header("Content-type: text/html;charset=GBK");//Output encoding to avoid Chinese garbled characters
$pid=$_GET['pid'];
$db=mysql_connect("localhost","root","7529639"); //Create a database connection
mysql_query("set names 'GBK'");
mysql_select_db("menuclass");
$sql="select classname from menu where parentid=".$pid."";
$result=mysql_query($sql);
//Loop through options
while($rows=mysql_fetch_array($result)){
echo 'n";
}
?>