Home  >  Article  >  Backend Development  >  ajax +php secondary linkage menu code_PHP tutorial

ajax +php secondary linkage menu code_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:07:07891browse

ajax +php secondary linkage menu code




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";
}

?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630541.htmlTechArticleajax +php secondary linkage menu code script language=javascript var http_request=false; function send_request(url){/ /Initialize, specify the processing function, and send the request function http_reque...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn