Cc Zona wrote:

> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Vicki) wrote:
> 
> 
>> $db = mysql_connect ("hostname", "user", "password");
>>
>>if (!$db)
>>{
>>echo "Error: Could not connect to database. Please try again later.";
>>exit;
>>}
>>
> 
> BTW, you can reduce that block down to a single line:
> 
> $db = mysql_connect ("hostname", "user", "password") or die("Error: Could 
> not connect to database. Please try again later.");
>

echo the error.
$db = mysql_connect ("hostname", "user", "password");
echo mysql_errno().": ".mysql_error()."<BR>";
Then you will know what the problem is.
BTW if you are using the Dreamweaver extension that shows you the 
includes, get rid of it. It will rewrite your includes where they are 
all the same.

Gary




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to