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 个表,即在数据库中进行查询和广告,即 xyz_db。当我提交广告表格时,我收到此警告错误...我在另一个表格(查询)中使用了相同的数据库、用户名和密码-此表格工作正常..