문제

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());
도움이 되었습니까?

해결책

Try This...

     $db = mysql_connect("localhost","nativepl_search","fun@123") or 
                  die("Error connecting to database: ".mysql_error());

     mysql_select_db("nativepl_native",$db) or die(mysql_error());

다른 팁

The code you are showing above is incomplete. You probably have another line like mysql_connect("localhost","nativepl"); in between the two lines that you show above.

Or it can also be inside some function or include that you call in between those two lines.

Find it and remove it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top