try {
$Database = new PDO('mysql : host=localhost ;dbname = dbnamea', 'root' ,'');
} catch ( PDOException $e) {
echo 'Manually Define Error';
die();
}
I have a connection file which include in login.Now This try catch I'll put in connection file so I will define Out side the class or inside the class constructor
Can Any one plz let me know which one will be better and why??
Thanks in advance