<?php
    
    $email = file_get_contents("php://stdin");
    $db = new PDO(
        "mysql:host=localhost;dbname=class_example",
        "class_user",
        "class_password"
    );

    $db->prepare("
        INSERT INTO emails
            (`email`)
        VALUES
            (:email)
    ")->execute(array(
        ':email' => $email
    ));

?>
