My phpmyadmin is inside the server. I want to connect my database from my remote PC to the database in the server using php. I would greatly appreciate if someone can suggest a way to connect the database remotely in windows platform.
Set your GLOBALS in a constants.inc.php file, or something similar. So;
$db_server would be: (for example) 127.0.0.1
$db_user would be: (for example) root
$db_pass would be: (for example) password
Use this as a function to connect to your databases in your code.
@mysql_connect($GLOBALS['db_server'], $GLOBALS['db_user'], $GLOBALS['db_pass']) or trigger_error("Could not connect to MySQL database", E_USER_ERROR);
@mysql_select_db($dbName) or trigger_error("Unable to access $dbName database", E_USER_ERROR);
To connect to your database, simply do this in the code where you'd like to connect;
To connect to your databases through phpMyAdmin to make changes, etc etc; in your browser - simply do your webservers IP address or domain name like so.