Hi friends,
I want to know, connectivity steps in PHP with Mysql ?
Conncetivity in PHP with Mysql
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 28, 2011, 8:27 AM EST
$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