Re: Connecting to db on a different machine

From: Date: Wed, 27 Dec 2000 10:36:04 +0000
Subject: Re: Connecting to db on a different machine
Groups: php.db 
Request: Send a blank email to php-db+get-5457@lists.php.net to get a copy of this message
$db = "mydatabasename"; $user = "myusername"; $pw = "mypassword"; $mysql_access = mysql_connect("domain_name_or_ip_address", $user, $pw); mysql_select_db($db, $mysql_access); easy cheesey. just make sure you're using the correct name and password. if you need to setup a new user name and password consult the mysql docs on granting permission. www.mysql.com jason Scott Fletcher <scott@abcoa.com> wrote in message news:92d5qa$lcg$1@toye.p.sourceforge.net... > Hiya Everyone! > > I'm a bit stump on how can I do this. I'm doing a webpage that connect > to the database using PHP. Right now I have a 2nd website which is on a > different machine and I have not yet figure out how to write the script that > would allow the website on the different machine to hook up to the original > machine which host the 1st website and have a database. > I found that odbc_connect is not hte way to go because it only include > the database table, username and password but lack the machine name. > > Anyone know? Thanks! > > Scott > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#5457) next »