PHP Mysql数据库登录

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP Mysql数据库登录相关的知识,希望对你有一定的参考价值。

  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() );

以上是关于PHP Mysql数据库登录的主要内容,如果未能解决你的问题,请参考以下文章