function FixString($strtofix)
{ //THIS FUNCTION ESCAPES SPECIAL CHARACTERS FOR INSERTING INTO SQL
if (get_magic_quotes_gpc()) { $addslash="no"; } else { $addslash="yes"; }
if ($addslash == "yes") { $strtofix = addslashes($strtofix); }
$strtofix = ereg_replace( "<", "<", $strtofix );
$strtofix = ereg_replace( "'", "'", $strtofix );
$strtofix = ereg_replace( "(\n)", "
", $strtofix );
return $strtofix;
}//end FixString
/*------------------------------------------------
THE FOLLOWING ALLOWS GLOBALS = OFF SUPPORT
------------------------------------------------*/
// $_GET VARIABLES
foreach($_GET as $a=>$b){$$a=$b;}
// $_POST VARIABLES
foreach($_POST as $a=>$b){$$a=$b;}
/*------------------------------------------------
END GLOBALS OFF SUPPORT
------------------------------------------------*/
$dbuser = "lsmadm5_leads";
$dbserver = "lsmadministration.net";
$dbpass = "summer2014";
$dbname = "lsmadm5_lsmleads";
//CONNECTION STRING
$mysqli = new mysqli($dbserver, $dbuser, $dbpass, $dbname);
$qclid = $mysqli->real_escape_string($qclid);
$query = "select email, lead_type_id from C30_ACCOUNTS where account='$qclid'";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_assoc()) {
$lead_type_id = $row["lead_type_id"];
$email_site = $row["email"];
}
$result->free();
}
if ($lead_type_id ==0) {
echo "Account number not set.
";
echo "Please email: info@lsminsurance.ca