??????????????°????PHP?????л???????????????д??????????……??????INSERT INTO????????????????????????????????????????????????????????????????й漲???????gbk?????????У???????????????????????
????1.php?????????UTF-8?????????
????2.php???????????????UTF8??
????3.MYSQL?????????????ENGINE=MyISAM DEFAULT CHARSET=utf8;
????????????????????д??????????????о????????????
?????????
????Create TABLE `net_city` (
????`cityid` smallint(4) NOT NULL auto_increment??
????`cityname` varchar(80) NOT NULL default ''??
????`provinceid` smallint(2) NOT NULL default '0'??
????`inarea` varchar(5000) NOT NULL default ''??
????`outarea` varchar(5000) NOT NULL default ''??
????`tel` varchar(400) NOT NULL default ''??
????PRIMARY KEY (`cityid`)
????) ENGINE=MyISAM DEFAULT CHARSET=utf8;
????PHP??????
????$conn=mysql_connect("localhost"?? "?????"?? "????");
????mysql_query("set names 'utf8'"??$conn);
????mysql_select_db("??????"??$conn);
????$exec="insert into net_city (cityname??inarea??outarea??tel) values ('".$link_cityname."'??'".$link_inarea."'??'".$link_outarea."'??'".$link_tel."')";
????$result=mysql_query($exec??$conn);
????if($result){
????echo "1";
????}else{
????echo "0";
????}
????mysql_close($conn);
??????????????????????ó?gbk???????????