Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user '...'@'localhost' (using password: YES) in on line 2
$con = mysql_connect("localhost","xyz","xyz@123");
if (!$con) { die('Could not connect: ' . mysql_error());
Print "no connect";
} mysql_select_db("digifivm_prosperria", $con);
$sql="INSERT INTO digifivm_prosperria.advertise (iam, type, iwant, name, email, phoneno, query) VALUES ('$_POST[iam]','$_POST[type]','$_POST[iwant]','$_POST[name]','$_POST[email]','$_POST[phoneno]','$_POST[query]')"; mysql_close($con);
我创建了2个表格,即查询&amp;在数据库中做广告,即xyz_db。当我提交广告表单时,我收到此警告错误...我使用了相同的数据库,用户名和&amp;另一种形式的密码(查询) - 这种形式工作正常..
答案 0 :(得分:1)
检查mysql用户名,密码和数据库名称。