Posted By

mikegreen on 05/21/08


Tagged

mysql database textmate dbms


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


PHP MySQL Connect


 / Published in: PHP
 

  1. <?php
  2.  
  3. define ('DB_USER', '');
  4. define ('DB_PASSWORD', '');
  5. define ('DB_HOST', '');
  6. define ('DB_NAME', '');
  7.  
  8. $dbc = mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die('Could not connect to MySQL: ' . mysql_error());
  9. mysql_select_db (DB_NAME) OR die('Could not select the database: ' . mysql_error());
  10.  
  11. ?>

Report this snippet  

You need to login to post a comment.