obanana_b2b_test/contact-us-action.php

42 lines
993 B
PHP

<?php
include "functions.php";
$fName = $_POST['firstname'];
$lName = $_POST['lastname'];
$email = $_POST['email'];
$phone = $_POST['phonenumber'];
$message = $_POST['message'];
$response = sendEmail_obanana(
$fName,
$lName,
$email,
$phone,
$message,
);
$array = json_decode($response,true);
var_dump($array);
header("location: contact-us.php");
# 02-15-2024 Stacy added message sent
// $result = customerExists($_SESSION["email"]);
if ($response) {
$_SESSION["SuccessfullySent"] = "Message Sent Successfully";
header("location: contact-us.php");
}
#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");
}