2024-02-15 09:28:08 +08:00
|
|
|
<?php
|
|
|
|
include "functions.php";
|
2024-02-15 20:42:37 +08:00
|
|
|
|
2024-02-15 09:28:08 +08:00
|
|
|
$fName = $_POST['firstname'];
|
|
|
|
$lName = $_POST['lastname'];
|
|
|
|
$email = $_POST['email'];
|
|
|
|
$phone = $_POST['phonenumber'];
|
|
|
|
$message = $_POST['message'];
|
|
|
|
|
2024-02-20 13:01:25 +08:00
|
|
|
$response = sendEmail_obanana(
|
2024-02-15 09:28:08 +08:00
|
|
|
$fName,
|
|
|
|
$lName,
|
|
|
|
$email,
|
|
|
|
$phone,
|
|
|
|
$message,
|
|
|
|
);
|
|
|
|
$array = json_decode($response,true);
|
|
|
|
var_dump($array);
|
2024-02-16 12:59:22 +08:00
|
|
|
header("location: contact-us.php");
|
2024-02-15 16:12:28 +08:00
|
|
|
|
2024-02-16 11:05:02 +08:00
|
|
|
|
|
|
|
# 02-15-2024 Stacy added message sent
|
2024-02-20 13:01:25 +08:00
|
|
|
// $result = customerExists($_SESSION["email"]);
|
|
|
|
if ($response) {
|
2024-02-15 16:12:28 +08:00
|
|
|
$_SESSION["SuccessfullySent"] = "Message Sent Successfully";
|
2024-02-16 12:59:22 +08:00
|
|
|
header("location: contact-us.php");
|
2024-02-16 11:05:02 +08:00
|
|
|
}
|
2024-02-20 13:01:25 +08:00
|
|
|
|
|
|
|
#02-19-2024 Stacy added email to be sent to customer
|
|
|
|
$response2 = sendEmail_customer(
|
|
|
|
$fName,
|
|
|
|
$lName,
|
|
|
|
$email,
|
|
|
|
);
|
|
|
|
$array = json_decode($response2,true);
|
|
|
|
var_dump($array);
|
|
|
|
header("location: contact-us.php");
|
|
|
|
|
|
|
|
if ($response2) {
|
|
|
|
// $_SESSION["SuccessfullySent"] = "Message Sent Successfully";
|
|
|
|
header("location: contact-us.php");
|
|
|
|
}
|