MySQL Forums
Forum List  »  Newbie

Connection to mysql from php
Posted by: m condiff
Date: July 22, 2005 08:54PM

<html>
<head><title>Connect Server</title></head>
<body>
<?
$host = “localhost”;
$user = “root”;
$pass = “admin”;

$connect = mysql_connect($host, $user, $pass);


?>
</body>
</html>

Warning: mysql_connect(): Unknown MySQL Server Host '“localhost”' (11001) in C:\Program Files\Apache Group\Apache2\test\connect.php on line 9

dont understand why this doesnt work. everythings looks ok. but i get this error. PHP is fine until i try to connect ot mysql.

Please help.
Mike

Options: ReplyQuote


Subject
Written By
Posted
Connection to mysql from php
July 22, 2005 08:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.