<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "myDBPDO";
{
cuba conn = new PDO("mysqli:host=$servername;dbname=$dbname;",$username,$password);
$conn->serAttribute( PDO ::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$stmt->bindParam(':email',$email $email = "jhon@example.com";
$); stmt->execute();
$firstname = "Mary";
$lastname = "Moe";
$email = "mary le.com" ;
$stmt->execute(); ";
" }catch(PDOException $e){
$conn= null;
Siarkan kod ralat atau anda tidak akan dapat membacanya. .