
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
<?php
 header("Access-Control-Allow-Origin: *");

file_put_contents('.log_'.date("j.n.Y").'.log', print_r($_POST['your-service'], true), FILE_APPEND);
 ?>

<?php

// do something

$your_city = $_POST['your-city'];
$phonenumber = $_POST['phonenumber'];
$your_car = $_POST['your-car'];
$your_email = $_POST['your-email'];
$your_name = $_POST['your-name'];
$source = $_POST['source'];
$gender = $_POST['gender'];

print_r($_POST);

date_default_timezone_set("Asia/Riyadh");

$date = date("Y-m-d H:i:s");

$sql = "insert into xx_fur_leads (name,mobile,car,city,request_date,email_address,source,gender)values('$your_name','$phonenumber','$your_car','$your_city','$date','$your_email','$source','$gender')";
    


//file_put_contents('.log_'.date("j.n.Y").'.log', $log, FILE_APPEND);

?>

<?php
date_default_timezone_set("Asia/Riyadh");


$dbhost = 'localhost';
$dbuser = 'balubaid_core3_leads';
$db = 'balubaid_core3_leads';
$dbpass = 'Vision@2050';
//$id = $_GET['id'];
$link = mysqli_connect($dbhost, $dbuser, $dbpass, $db);
$link->set_charset("utf8");
if (!$link) {
    echo "Error: Unable to connect to MySQL." . PHP_EOL;
    echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
    echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
    exit;
}

$confirm = $_GET['confirm'];
$date = date("Y-m-d h:i:sa");

if($confirm == '@CRM1'){

$codequery = $sql;

if ($link->query($codequery) === TRUE) {

    
}
}
?>