(888) 411-2221 info@realx.com

Send Quote

[insert_php]

// check if not spam
if (
(strpos(strtolower($_POST[“first_name”]), “http”) === false && strpos(strtolower($_POST[“last_name”]), “http”) === false && strpos(strtolower($_POST[“webtolead_email1”]), “http”) === false)
&&
(strtolower($_POST[“first_name”]) != strtolower($_POST[“last_name”]))
) {
//
// enter lead Real X CRM
//
$postFields = ”;
$postFields .= ‘first_name=’ . $_POST[“first_name”];
$postFields .= ‘&’;
$postFields .= ‘last_name=’ . $_POST[“last_name”];
$postFields .= ‘&’;
$postFields .= ’email1=’ . $_POST[“webtolead_email1”];
$postFields .= ‘&’;
$postFields .= ‘phone_work=’ . $_POST[“phone_work”];
$postFields .= ‘&’;
$postFields .= ‘description=’ . $_POST[“description”];
$postFields .= ‘&’;
$postFields .= ‘campaign_id=a798dc96-8262-4f29-3714-51f132f7a6f2’;
$postFields .= ‘&’;
$postFields .= ‘lead_source=Web Site’;
$postFields .= ‘&’;
$postFields .= ‘assigned_user_id=1’;
$postFields .= ‘&’;
$postFields .= ‘req_id=last_name’;

$ch = curl_init(‘https://realx.com/crm/index.php?entryPoint=WebToLeadCapture’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields );
$result = @curl_exec($ch);
//
// send email message to admin
//
$msg = “”;
$msg .= “First Name: ” . $_POST[“first_name”] . “\n”;
$msg .= “Last Name: ” . $_POST[“last_name”] . “\n”;
$msg .= “Tel: ” . $_POST[“phone_work”] . “\n”;
$msg .= “Email: ” . $_POST[“webtolead_email1”] . “\n”;
$msg .= “Project type: ” . “\n”;

$msg .= “Description: ” . $_POST[“description”] . “\n”;

$header = “”;
$header .= “MIME-Version: 1.0”;
$header .= “\r\n”;
$header .= “Content-type: text/plain; charset=UTF-8”;
$header .= “\r\n”;
$header .= “From: RFQ@realx.com”;

mail(“rani.bornstein@gmail.com”, “Real X Software RFQ”, $msg, $header);

}

header(“location: quote-thanks”);
[/insert_php]