Re: Newbie ?: why this error?

From: Date: Wed, 05 Sep 2001 13:13:58 +0000
Subject: Re: Newbie ?: why this error?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-66036@lists.php.net to get a copy of this message
That's good to know. Thanks! Vicki In article <20010905045436.28450.qmail@pb1.pair.com>, cczona@nospam.invalid (Cc Zona) wrote: > In article <vickimills-334679.22185904092001@pb1.pair.com>, > vickimills@earthlink.net (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."); > > See <http://php.net/die> for more info.

« previous php.general (#66036) next »