connecting to db

From: Date: Thu, 22 Aug 2002 04:01:51 +0000
Subject: connecting to db
Groups: php.general 
Request: Send a blank email to php-general+get-113572@lists.php.net to get a copy of this message
Hi, Just setting up a new db at a new domain and the connection script does not work. I've always been able to connect to a db using the following: <?php // Connect to the database server $dbcnx = @mysql_connect("localhost", "username", "password"); if (!$dbcnx) { echo( "<P>Unable to connect to the " . "database server at this time.</P>" ); exit(); } The host support suggests the following: > Root as the mysql user and localhost as the server, unless you selected remote mysql > connections from the web control panel. BTW: I DID select remote mysql. Should I unselect it? FMI (forgive my ignorance): What connection script should I use? Thanks So Much in Advance, Jim Long

« previous php.general (#113572) next »