golden hour
/home4/theinves/public_html/seshaasschool.com/api
⬆️ Go Up
Upload
File/Folder
Size
Actions
form_transfer-certificate.php
995 B
Del
OK
forms_registration.php
4.34 KB
Del
OK
forms_schedule_a_tour.php
1.25 KB
Del
OK
modal
-
Del
OK
Edit: forms_schedule_a_tour.php
<?php ob_start(); session_start(); include "../dashboard/config/config.php"; include "../dashboard/config/session.php"; if(isset($_POST['type']) && $_POST['type']=='submission'){ try{ $name = $_POST['name']; $last_name = $_POST['last_name']; $email = $_POST['email']; $phone_number = $_POST['phone_number']; $pin_code = $_POST['pin_code']; $visit = $_POST['visit'] ?? ""; $additional = $_POST['additional']; $statement = $pdo->prepare("INSERT INTO `tbl_schedule_tour`(`name`, `last_name`, `email`, `phone_number`, `pin_code`, `visit`, `additional`) VALUES (?,?,?,?,?,?,?)"); $result = $statement->execute(array($name, $last_name, $email, $phone_number, $pin_code, $visit, $additional)); if($result){ $return_arr['message']='Form Submitted Successfully...'; $return_arr['status']=200; } else{ $return_arr['message']='Something Went Wrong..'; $return_arr['status']=400; } }catch(PDOException $e){ $return_arr['message']="$e.$visit"; $return_arr['status']=500; } echo json_encode($return_arr); } ?>
Save