query('PRAGMA journal_mode = WAL;'); $db->query('PRAGMA busy_timeout = 60000;'); $db->query('PRAGMA cell_size_check = ON;'); $db->query("PRAGMA encoding = 'UTF-8';"); $db->query("PRAGMA foreign_keys = ON;"); $qry_insert = $db->prepare( 'INSERT INTO doors (nominal_width, nominal_height) VALUES (?,?)'); $qry_insert->bindValue(1, $nominal_width, SQLITE3_INTEGER); $qry_insert->bindValue(2, $nominal_height, SQLITE3_INTEGER); $res = $qry_insert->execute(); //Redirect to a different page in the current directory that was requested //can using parameters to support authentication flow like user id! get user $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $extra = 'index.php'; //header location will automatically kill the code below it header("Location: http://$host$uri/$extra"); ?>