34 lines
1.9 KiB
PHP
34 lines
1.9 KiB
PHP
<?php
|
|
|
|
require_once "../db/config.php";
|
|
require_once "../includes/functions.php";
|
|
|
|
$_REQUEST_METHOD = $_SERVER['REQUEST_METHOD'];
|
|
$response = array();
|
|
if ($_REQUEST_METHOD === 'POST') {
|
|
if (isset($connection)) {
|
|
$customer_first_name = $_POST['customer_first_name'];
|
|
$customer_last_name = $_POST['customer_last_name'];
|
|
$customer_emailid = $_POST['customer_emailid'];
|
|
$customer_contact_number = $_POST['customer_contact_number'];
|
|
$customer_company_country = $_POST['customer_company_country'];
|
|
$customer_company_name = $_POST['customer_company_name'];
|
|
$customer_products_services = $_POST['customer_products_services'];
|
|
$customer_your_use_case = $_POST['customer_your_use_case'];
|
|
$customer_monthly_spend_infrastructure = $_POST['customer_monthly_spend_infrastructure'];
|
|
$customer_deployment_migration = $_POST['customer_deployment_migration'];
|
|
$customer_message = $_POST['customer_message'];
|
|
|
|
$insertCategory = $connection->query("INSERT INTO `customer_support` (`customer_first_name`, `customer_last_name`, `customer_emailid`, `customer_contact_number`, `customer_company_country`, `customer_company_name`, `customer_products_services`, `customer_your_use_case`, `customer_monthly_spend_infrastructure`, `customer_deployment_migration`, `customer_message`) VALUES ('$customer_first_name', '$customer_last_name', '$customer_emailid', '$customer_contact_number', $customer_company_country, '$customer_company_name', $customer_products_services, $customer_your_use_case, '$customer_monthly_spend_infrastructure', '$customer_deployment_migration', '$customer_message')");
|
|
|
|
$response["message"] = "Success";
|
|
$response["status"] = 200;
|
|
}
|
|
|
|
} else {
|
|
$response["message"] = "INVALID REQUEST";
|
|
$response["status"] = 400;
|
|
}
|
|
|
|
echo json_encode($response);
|