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;


Cheers, Ian.
Randum Ian
DJ / Reviewer / Webmaster, DancePortal (UK) Limited
DancePortal.co.uk - Global dance music media

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to