Posts by RebekaOdilon • 1 point
1 post
-
-1
votes1
answer100
viewsQ: I’m getting this error while trying to connect mysql: Fatal error: Uncaught Error: Call to a Member Function prepare() on null
php connection. try{ $conn = new PDO("mysql:host=$servidor;dbname=$banco;charset=utf8", $usuario, $senha); return $conn; }catch(PDOException $e){ throw new PDOException($e); } base php. require…