Posted By

sjacunningham on 10/14/10


Tagged

mysql php db logon


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

pytheas
bobbym245
koyotebr


PHP Mysql db logon


 / Published in: PHP
 

  1. $hostname_logon = "xxxxxx";
  2. $database_logon = "xxxxxx";
  3. $username_logon = "xxxxxx";
  4. $password_logon = "xxxxxx";
  5. //open database connection
  6. $connections = mysql_connect($hostname_logon, $username_logon, $password_logon) or die or die( "Error! Could not logon: " . mysql_error() );
  7. //select database
  8. mysql_select_db($database_logon) or die or die( "Error! Could not select the database: " . mysql_error() );

Report this snippet  

You need to login to post a comment.