Learning PHP and MySQL

Example 14-10 Suppressing the standard database error message

<?php require_once('db_login.php');
$error  =  "Site  down  for  maintenance,  please  check  back.";
$db_link  =  @mysql_connect($db_host,  $db_username,  $db_password)  or  die($error);
@
mysql_select_db($db_database,  $db_link)  or  die($error);
?>

Posted by on 09/25 at 02:46 PM

Next entry: Example 14-11 Seeing the results of magic quotes

Previous entry: Example 14-9 session.save_path functionality

<< Back to main