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);
I have created 2 tables i.e. enquiry & advertise in a database i.e. xyz_db. When I am submitting advertise form I have got this warning error... I have used same database, username & password in another form (enquiry)-this form is working fine..