PHP Mysql db logon


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.