SQL execution is normal. php execution has an error ~~ The error is Access & nbsp; denied & nbsp; for & nbsp; user: & nbsp; 'odbc @ localhost' & nbsp; (Using & nbsp; password: & nbsp; NO) I used a blank password before, and there was no error. now there are no errors in other files, so there is no problem in executing this SQL statement in php ~~
The error is Access denied for user: 'odbc @ localhost' (Using password: NO)
I used a blank password before, and there was no error. now there are no errors in other files. this error is caused by the following code:
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 ('registered successfully'); script
";
}
Else
{
$ Response = "script alert ('registration failed'); script";
}
}
$ Smarty-> assign ("regstatus", $ response );
$ Smarty-> display ("reg.html ");
?>
------ Solution --------------------
When no one answers the question, you can manage menu-> to delete the post.
------ Solution --------------------
So, look for the reason first.