PHP头条
热点:

sql中执行没有关问题php中执行出错~


sql中执行没问题php中执行出错~~
错误是Access denied for user: 'ODBC@localhost' (Using password: NO)
我之前用的也是空密码,也没出错,现在其他文件也没出错,就这一个出错,贴出代码如下

error_reporting(0);
session_start();
require('../libs/Smarty.class.php');
$smarty = new Smarty;
//$smarty->force_compile = true;
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 120;



if($_POST['ok'].value==1)
{
$username=$_POST['username'];
$userpwd=$_POST['userpwd'];
$query=mysql_query("INSERT INTO user (user,pwd)  values 

('$username','$userpwd')")or die(mysql_error());
if($query)
{
$response="《script》alert('注册成功');《script》
";
}
else
{
$response="《script》alert('注册失败');《script》";

}
}
$smarty->assign("regstatus",$response);
$smarty->display("reg.html");
?>

------解决方案--------------------
没人回答时,完全可以 管理菜单-》删除帖子。
------解决方案--------------------
所以说啊 自己找找原因先

www.phpzy.comtrue/phprm/14143.htmlTechArticlesql中执行没有关问题php中执行出错~ sql中执行没问题php中执行出错~~ 错误是Accessdeniedforuser:'ODBC@localhost'(Usingpassword:NO) 我之前用的也是空密码,也没出错,现在其他文件也没出错,就这一...

相关文章

相关频道:

PHP之友评论

今天推荐