Hi every body. I got an php scrip that supposed to connect to mysql sever. The connection string was like this one
since i am runing mysql server on local server i did not put any pass for it and i tried to connect like this :
But unfortuently when i run it. I get the following error:
i be happy if some one help me fix this problem.Thanks
Code:
$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS)
since i am runing mysql server on local server i did not put any pass for it and i tried to connect like this :
Code:
$this->connection = mysql_connect(localhost,root) or die(mysql_error());
But unfortuently when i run it. I get the following error:
Code:
Notice: Use of undefined constant localhost - assumed 'localhost' in c:\inetpub\[URL unfurl="true"]wwwroot\sources\database.php[/URL] on line 23
Notice: Use of undefined constant root - assumed 'root' in c:\inetpub\[URL unfurl="true"]wwwroot\sources\database.php[/URL] on line 23
Unknown database 'insert your database details here'
i be happy if some one help me fix this problem.Thanks