From 86613978c06546af098e96ed9b9496a3dd67ad62 Mon Sep 17 00:00:00 2001 From: Mateja Date: Fri, 2 Oct 2020 19:36:16 +0200 Subject: Work on reservation... --- reservation.php | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'reservation.php') diff --git a/reservation.php b/reservation.php index 7b34f71..ec46440 100644 --- a/reservation.php +++ b/reservation.php @@ -25,24 +25,7 @@ session_start();
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - $stmt = $conn->prepare("INSERT INTO activities (name, surname, age) VALUES (:name, :surname, :age)"); - $stmt->bindParam(':name', $_POST['fname']); - $stmt->bindParam(':surname', $_POST['lname']); - $stmt->bindParam(':age', $_POST['age']); - $stmt->execute(); - echo "

Data inserted.

"; - } catch (PDOException $e) { - echo "

Error!: " . $e->getMessage() . "

"; - } -} + require "handle-reservation.php"; ?>
@@ -52,11 +35,15 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['fname']) && isset($_PO + + - + + + - +
I will be active on bands: -- cgit v1.2.3