Forum Moderators: open
Please advise!
Below is the script that I'm using on establishing database connection.
>>>
define('DB_USER','myusername');
define('DB_PASSWORD','mypassword');
define('DB_HOST','mysql.example.com');
define('DB_NAME','dbcms');
$dbc = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)or die ('Could not connect to dbase:' .mysql_error());
@mysql_select_db(DB_NAME) or die ('Could not select the dbase:' . mysql_error());
[edited by: jatar_k at 6:48 am (utc) on Feb. 25, 2006]
[edit reason] removed specifics [/edit]
Personally, I'd be very suspicious of doing this. Leaving mysql open to the internet makes me very uncomfortable. Suggest you try and find a better way to do this.