关于省市二级联动乱码的问题!急!!!在线等
利用php+mysql+jquery完成类似省市二级联动的问题 ,就是学院下有不同的班级,功能已完成就是选择学院后再选班级是乱码的,改了很多得编码类型,单独测试班级的页面是正常的,请问这是什么出了问题??
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><?php
Header("Content-type:text/html;charset=GBK");
$conn=mysql_connect("localhost","root","");
mysql_select_db("openlab");
mysql_query("set names utf8");
$sql="select * from class where fatherid=".$_GET['academy_id'];
$query=mysql_query($sql);
while($row=mysql_fetch_array($query)){
$class[]=$row;
}
?>
<select id="class" name="student_class" ">
<option value="0">请选择班级</option>
<?php
foreach($class as $k=>$v){
$v['class_name']=iconv ('utf-8','GBK', $v['class_name']);
?>
<option value='<?php echo $v['class_id']?>'><?php echo $v['class_name']?></option>
<?php
}
?>
</select>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号