PHP Mysql connection failure?
Posted: Fri Oct 19, 2007 6:58 pm
Here is the code:
***** PLEASE USE
I have WAMP5 1.7.3 correctly configured. MySQL and PHPMyAdmin setup with my databases correctly.
DreamWearver is my editor and I have repeatedly run this simple code and I get nothing.
A blank browswer screen. The username is correct and the password is wrong.
It should fail but it's not giving the error message.
Even with the correct password, I can not tell if it connected or not.
Someone plesae help
***** PLEASE USE
Code: Select all
AND OTHER TAGS WHEN POSTING CODE *****[/color]Code: Select all
<?php
$connection = mysql_connect("localhost", "root", "passio");
if(!$connection) {
die(Database connection failed; " . mysql_error());
}
?>
<html>
<head>
<title>MsqlTry2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>I have WAMP5 1.7.3 correctly configured. MySQL and PHPMyAdmin setup with my databases correctly.
DreamWearver is my editor and I have repeatedly run this simple code and I get nothing.
A blank browswer screen. The username is correct and the password is wrong.
It should fail but it's not giving the error message.
Even with the correct password, I can not tell if it connected or not.
Someone plesae help