《script》
//Ajax
var xmlHttp;
function createXMLHttpRequest() {
if(window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
function record(id){
createXMLHttpRequest();
url = "action.php?id="+id+"&ran="+Math.random();
method = "GET";
xmlHttp.open(method,url,true);
xmlHttp.onreadystatechange = show;
xmlHttp.send(null);
}
function show(){
if (xmlHttp.readyState == 4){
if (xmlHttp.status == 200){
var text = xmlHttp.responseText;
document.getElementById("s2").innerHTML = text;
}else {
alert("response error code:"+xmlHttp.status);
}
}
}
《script》
Error:".mysql_error());
if(mysql_affected_rows() > 0){
$arrMenu=array();
while($rows = mysql_fetch_array(MYSQL_ASSOC)){
array_push($arrMenu,$rows);
}
}
mysql_close();
if(!empty($arrMenu)){
echo "";
}
}
?>
/phprm/51600.htmlwww.phpzy.comtrue/phprm/51600.htmlTechArticlePHP+MySQL实现下拉框显示数据库信息解决思路 PHP+MySQL实现下拉框显示数据库信息 Classroom research CRMS - Classroom research Classroom ID Course ID --请选择-- $con = mysql_connect("localhost","root",""); $search_c...
PHP之友评论