|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-06-03 17:27 UTC] zeev
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 08:00:01 2025 UTC |
<HTML><HEAD><TITLE>Testing connection</TITLE></HEAD><BODY> <?php $host = "localhost"; $user = "bogus"; $pw = "foo"; // error_reporting(1); /* Turn of "failed connect" warning */ $conn = mysql_connect($host, $user, $pw); if ($conn || mysql_errno()) { echo "Failed connect to '$host' as user '$user' using pword '$pw'<br>\n"; } else { echo "Connected to host '$host'<br>\n"; } echo "MySQL status: (". mysql_errno().": '".mysql_error()."')<BR>"; ?> </BODY></HTML>