数据库编码为gb2312,重新改写了wap程序编码为utf-8

 
$user = iconv("utf-8", "gb2312",addslashes(urldecode($_POST['username'])));
$pass = md5(urldecode($_POST['password']));
$SQL = "SELECT `password` FROM " . USER_TABLE . " WHERE `username` = '$user'";
$Result = $DB -> query($SQL);
$Row = $DB -> queryArray($Result);
if($Row['password'] == $pass){
session_register(name');
$_SESSION[name'] = iconv("gb2312", "utf-8",$user);
}

发表评论

电子邮件地址不会被公开。 必填项已用*标注