List:General Discussion« Previous MessageNext Message »
From:jeffrey_n_Dyke Date:July 20 2004 10:21pm
Subject:Re: remote connection php code
View as plain text  

> Hi All

> Could someone give me a clue or a snippet of PHP code I can test a romte
> connection to my MySQL DB for my website please?

Just take the one you're currently using and replace 'localhost' with
'someotherserver.com'
$cnx = mysql_connect('someotherserver.com','uname','pword');
mysql_select_db('dbname',$cnx);
mysql_query('Select * from table',$cnx);
etc....

As long as the GRANT's are set up to accept connections from an exteral
client and Firewall ports are open(if needed), it will not differ much from
local testing.

HTH
Jeff

> Thank you
> Andrew






Thread
remote connection php codeBusiness A2Z20 Jul
Re: remote connection php codejeffrey_n_Dyke21 Jul