real_query($sql); $res = $conn->use_result(); if(!empty($res)){ $row = $res->fetch_assoc(); $pageid=$row["ID"]; $titre=$row["titre"]; $texte=$row["texte"]; $pagetitle=$row["pagetitle"]; $pagedesc=$row["pagedesc"]; }else{ #ERROR 404 $titre="Page non found"; } unset($res); unset($result); include("_include_top.php"); switch ($pageid) { case 2: #### CONTACT US ####?>






Contact Form




query($sql); $row = $res->fetch_assoc(); $emailto=$row["valeur"]; unset($res); $conn->close(); $company = $_POST["company"]; $name = $_POST["name"]; $email = $_POST["email"]; $phone = $_POST["phone"]; $address = $_POST["address"]; $city = $_POST["city"]; $province = $_POST["province"]; $country = $_POST["country"]; $faxnumber = $_POST["faxnumber"]; if ($name!="" && $faxnumber=="") { if (strlen($name)>1){ if ($email!="" and strpos($email,"@")>0 and strpos($email,".")>0 ){ $to = $emailto; $subject = 'Item for sale from ' . $name; $message = "Company Name: " .$company. "
Name: " .$name. "
Email: " .$email. "
Phone: " .$phone. "


Model: " .$model. "
Make: " .$make. "
Year: " .$year. "
Asking Price: " .$askingprice. ""; $headers = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/html; charset=iso-8859-1' . "\r\n" . 'From: ' .$email . "\r\n" . 'Bcc: backup@esitecreations.ca' . "\r\n" . 'Reply-To: ' .$email. "\r\n" . 'X-Mailer: PHP/' . phpversion(); /* GET File Variables */ for($i=0; $i < count($_FILES['attachment']['name']); $i++){ $ftype[] = $_FILES['attachment']['type'][$i]; $fname[] = $_FILES['attachment']['name'][$i]; } // boundary $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; // headers for attachment $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; // multipart boundary $message = "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type: text/plain; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n"; $message .= "--{$mime_boundary}\n"; // preparing attachments for($x=0;$x



" .$returnmessage. "
";} echo $texte; ?>




Your message has been sent.


Attach image(s)