cant made mySQL connection

Posted by Andika Evangelion Thirteenth S on Stack Overflow See other posts from Stack Overflow or by Andika Evangelion Thirteenth S
Published on 2012-11-22T10:58:12Z Indexed on 2012/11/22 10:59 UTC
Read the original article Hit count: 143

Filed under:
|

I've use following code

$con = mysql_connect("localhost","root","");if (!$con)  {die('Could not connect: ' . mysql_error());} 

It's works. but when

$db_host='localhost';$db_id='root';$db_pass='';
$con = mysql_connect($db_host,$db_id,$db_pass);if (!$con)  {die('Could not connect: ' . mysql_error());} 

it didn't works, trying to swap ("),('),and empty in mysql_connect() and in $var and vice versa. Any help would be appreciated. Thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql