note 49292 rejected from function.mysql-connect by cece

From: Date: Sun, 23 Jan 2005 11:20:44 +0000
Subject: note 49292 rejected from function.mysql-connect by cece
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-83810@lists.php.net to get a copy of this message
Note Submitter: wang_di79 at hotmail dot com ---- I am using php-5.0.3, mysql 4.1.9 and Apache 2.0, I am trying to connect to mysql database using both mysqli_connect($db_server, $db_user,$db_pass, $db_name) and mysql_connect($db_server, $db_user,$db_pass,$db_name) I failed, I have set password for the database, so in my case, $db_server will be "localhost", $db_user will be "root",$db_pass will be "mypassword", $db_name will be "dbname" I wrote the following code to test the connection: $link = mysqli_connect("localhost", "root", "passwd", "dbname"); /* check connection */ if (!$link) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } printf("Host information: %s\n", mysqli_get_host_info($link)); /* close connection */ mysqli_close($link); Surprisingly, no error is shown. Can any expert tell me what is going wrong? you are welcome to send your comments to my email box at wang_di79@hotmail.com Billions of thanks

« previous php.notes (#83810) next »