prepare( "INSERT INTO jobs(vendor_id, job, ack, status) VALUES(?, 'New', 'new', '')" ); $stmt->execute([$vendor['id']]); if (!empty($_POST['ajax'])) { echo 'Success'; } else { header('Location: ../PDQ.php'); }