Mega Code Archive

 
Categories / Php / Language Basics
 

Stopping Page Execution

<?php      $db_conn = mysql_connect ("imaginaryhost", "rntsoft", "password");          // If no db connection, exit script      if(!$db_conn)      {           print("<b>I could not connect to the database! :(</b><br />");           print("This script will now exit<br />");           exit;      }          mysql_close($db_conn); ?>