From 86613978c06546af098e96ed9b9496a3dd67ad62 Mon Sep 17 00:00:00 2001 From: Mateja Date: Fri, 2 Oct 2020 19:36:16 +0200 Subject: Work on reservation... --- handle-reservation.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 handle-reservation.php (limited to 'handle-reservation.php') diff --git a/handle-reservation.php b/handle-reservation.php new file mode 100644 index 0000000..3e24dd8 --- /dev/null +++ b/handle-reservation.php @@ -0,0 +1,44 @@ +"; + $operatorName = $_POST["oname"] . "
"; + $operatorEmail = $_POST["email"] . "
"; + $operatorPhone = $_POST["phone"] . "
"; + + try { + //$conn = new PDO("mysql:host=localhost;dbname=$database", $user, $password); + //$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + //$stmt = $conn->prepare("INSERT INTO $table (name, surname, age) VALUES (:name, :surname, :age)"); + //$stmt->bindParam(':name', $_POST['fname']); + //$stmt->execute(); + //echo "

Data inserted.

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

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

"; + } +} -- cgit v1.2.3