Hi friends,
I want to know, connectivity steps in PHP with Mysql ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Nov 28, 2011, 1:27 PM
$con = mysql_connect("localhost","root","");
Here,
//server name=localhost
//username=root
//password=""
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
else
{
echo "Connected"."
";
}
mysql_close($con);
echo 'Connection closed successfully';
?>
Thanks