Hello friends, I have just begun to learn PHP. I prefer to learn in PDO way.
I write the following code to connect to phpmyadmin (wamp).
unable to understand the use of this function, even if it is useful why do we mention only two parameter with this, please help to
understand.
try{
$handler = new PDO('mysql:host=localhost;dbname=arjun_kaa_database','root','');
$handler->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e)
{
//echo "An Error is Catched<br>"; //$e->getmessage();
//die("More Specific Message will be >--------------> Something Wrong with the Database");
echo $e->getMessage();
die();
}
Thanks and Regards