$stmt = $db->prepare("..."); $stmt->execute(); $id = $db->lastInsertId();
$(document).ready(function(){ $.ajax({ url: "database/update.html", context: document.body, success: function(){ alert("done"); }}); });