John Gostick wrote:
Hi,
I have a quick question about using the PHP die() function. I'm building a
site around a MySQL database, and when I connect to the database from a PHP
page I use the following code:
$connection = mysql_connect($host, $user, $password)
or die("Error connecting to SQL server");
$db = mysql_select_db($database, $connection)
or die("'Error connecting to database");
you haven't told us what error messages you are getting - however my
guess is that your header() call fails because of the error message
produced by mysql_connect() if so you can try @mysql_connect($host,
$user, $password) instead so that error messages to browser are
suppressed ( you can achieve the same by editing your php.in)
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php