On Friday, April 26, 2002, at 12:20 PM, Randum Ian wrote:
> Hi all, Im having trouble with this code, can anyone help? > > --- > > <?php // db.php > > $dbhost = "localhost"; > $dbuser = "dancepo_db"; > $dbpass = "database"; > > function dbConnect($db="dancepo_db") { > global $dbhost, $dbuser, $dbpass; > > $dbcnx = @mysql_connect($dbhost, $dbuser, $dbpass) > or die("The site database appears to be down."); > > if ($db!="" and !@mysql_select_db($db)) > die("The site database is unavailable."); > > return $dbcnx; > } > ?> Well, you've simply defined a few variables and then a function. Do you expect it to do something? Show us the context in which this function is used. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php