<?php
$stmt=$pdo->prepare("INSERT INTO orders (id, customer, address, email) VALUES (null, :customer, :address, :email)");
$stmt->bindValue(':customer', $_POST['customer'], PDO::PARAM_STR);
$stmt->bindValue(':email', $_POST['email'], PDO::PARAM_STR);
$stmt->bindValue(':address', $_POST['address'], PDO::PARAM_STR);
$stmt->execute();
$id =$pdo->lastInsertId();
echo $id;