Re: Code Troubles
| From: | Miguel Cruz | Date: | Fri, 26 Apr 2002 16:24:55 +0000 |
| Subject: | Re: Code Troubles | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94745@lists.php.net to get a copy of this message | ||
It helps to say what sort of trouble you're having; i.e., provide
symptoms, exact text of error messages, etc.
miguel
On Fri, 26 Apr 2002, 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;
> }
> ?>
>
> ---
>
> Cheers, Ian.
> ---
> Randum Ian
> DJ / Reviewer / Webmaster, DancePortal (UK) Limited
> ian@danceportal.co.uk
> http://www.danceportal.co.uk
> DancePortal.co.uk - Global dance music media
>
>
>