0) { $i=0; if(!strlen(trim($_REQUEST['name']))>0) { $errMsg[$i++]="Name must be filled"; } if(!strlen(trim($_REQUEST['email']))>0) { $errMsg[$i++]="Email must be filled"; } //ADD MORE CHECKS HERE if($i==0) { // SEND MAIL $mailBody.="View Form Contents below:"."
"; $mailBody.="Name:".$_REQUEST['name1']."
"; $mailBody.="E-mail:".$_REQUEST['email']."
"; $mailBody.="Mobile:".$_REQUEST['mobile']."
"; $mailBody.="Any other Information:".$_REQUEST['message']."
"; ////SET THESE THINGS ACCORDING TO REQUIRMENTS $to="gsctubewells@engineer.com"; $from="From: Website Query"; $subject="New Contact Info Submitted."; /////////////////////////////////////////////// $semi_rand = md5(time()); $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x"; $headers=$from; $headers .= "\nMIME-Version: 1.0\n" . "Content-Type: multipart/mixed;\n" . " boundary=\"{$mime_boundary}\""; $email_message .= "This is a multi-part message in MIME format.\n\n" . "--{$mime_boundary}\n" . "Content-Type:text/html; charset=\"iso-8859-1\"\n" . "Content-Transfer-Encoding: 7bit\n\n" . $mailBody . "\n\n"; $fileatt_type = "application/octet-stream"; for($k=0;$k<=count($_FILES['fileup']['name']);$k++) { $fileatt=$_FILES['fileup']['tmp_name'][$k]; $fileatt_name=$_FILES['fileup']['name'][$k]; if(filesize($fileatt)>0) { $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); fclose($file); $data = chunk_split(base64_encode($data)); $email_message .= "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" . $data . "\n\n"; } } $ok = @mail($to, $subject, $email_message, $headers); header("Location: thanks.html"); } else { $err="Form could not be submitted successfully due to following reasons:"; } ////////////////////////////////////////////////////////// } ?> GURNAM SINGH & COMPANY







GURNAM SINGH & COMPANY
Tubewell Engineers 29/1, Industrial Area, Phase-II, Chandigarh (India)
Phone No : 0172-2652550, 2653550, Fax 2653550
E mail : gsctubewells@gmail.com , gsctubewells@engineer.com

SEND YOUR QUERIES

Name:
E-mail:
Phone:
Requirements
 
GURDARSHAN SINGH
Chairman
HARDEEP SINGH
B.E.(Mechatronics), M.E.(Mechanics)
Managing Director
AMANDEEP SINGH
B.E. (Mechanical)
Managing Director
Mobile No. 09815555550
HARKAMALDEEP SINGH
B.E. (Mechanical)
Managing Director
KULDEEP SINGH
Area Manager(Punjab & Haryana)
Mobile No. 09872670550
ARJUN SINGH
Area Manager (Uttarakhand & Uttar Pradesh)
Mobile No. 09872611550