topical media & game development

talk show tell print

basic-php-16-conn.php / php



  <?php
  define('SQL_HOST','localhost');
  define('SQL_USER','bp5am');
  define('SQL_PASS','bp5ampass');
  define('SQL_DB','comicsite');
  
  conn = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS)
    or die('Could not connect to the database; ' . mysql_error());
  
  mysql_select_db(SQL_DB, conn)
    or die('Could not select database; ' . mysql_error());
  ?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.