the below error i m getting:
Warning: mysql_select_db(): Access denied for user 'nativepl'@'localhost' (using password: NO) in /home/nativepl/public_html/testing/search.php on line 177
Warning: mysql_select_db(): A link to the server could not be established in /home/nativepl/public_html/testing/search.php on line 177 Access denied for user 'nativepl'@'localhost' (using password: NO)
user: nativepl_search pwd:fun@123 database:nativepl_native table:search
mysql_connect("localhost","nativepl_search","fun@123") or die("Error connecting to database: ".mysql_error());
mysql_select_db("nativepl_native") or die(mysql_error());
Using password: NO
indicates no password was supplied. But your code shows you supplying a password. Do you have anothermysql_connect()
call in your code? I'm quite certain that the code above is not your current code. You probably have code in between the 2 lines above, or the error is not coming from these lines. Notice how the error indicates you are using usernamenativepl
, whiel in your code you don't use this string at all. - nl-x