how to connect cpanel db from Localhost. i know connect from localhost. But i need to connect from server. i am trying like this
<?php
mysql_connect("208.91.199.141","username","password") or die(mysql_error());
mysql_select_db("db");
?>
i get an Error
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'glansade'@'49.206.54.187' (using password: YES) in C:\xampp\htdocs\calendar\db_server.php on line 2 Access denied for user 'glansade'@'49.206.54.187' (using password: YES).
How to solve this....? Please Help me. Thanks
mysql_query
interface. It's awful and is being removed in future versions of PHP. A modern replacement like PDO is not hard to learn. A guide like PHP The Right Way can help explain best practices. Always be absolutely sure your user parameters are properly escaped or you will have severe SQL injection bugs. – tadman