,Brannia Team '; if(basename($_SERVER['REQUEST_URI'])=='contact-us') { $fomtype='contact us'; $fname = strip_tags($_POST['fname']); $lname = strip_tags($_POST['lname']); $visitor_email = strip_tags($_POST['email']); $phone= strip_tags($_POST['phone']); $location= strip_tags($_POST['location']); $course = strip_tags($_POST['course']); $user_message = strip_tags($_POST['msg']); if(empty($_SESSION['6_letters_code']) || strcasecmp($_SESSION['6_letters_code'], $_POST['6_letters_code']) != 0) { //Note: the captcha code is compared case insensitively. //if you want case sensitive match, update the check above to // strcmp() //$errors .= "\n The captcha code does not match!"; echo ""; } else { //Email to User $subject1="".$fname." ".$lname.", we have received your web enquiry"; $body1 = "Dear ".$fname." ".$lname.",
Thank You for your interest in Shankara Group of Institutions (SGI) / New Delhi Institute of Information Technology (NDIIT). We have received your web enquiry. Our team will contact you shortly.

A copy of your data submitted is shared here for your reference.
First Name: ".$fname.",
Last Name: ".$lname.",
Email: ".$visitor_email .",
Phone: ".$phone.",
City: ".$location.",
Course: ".$course.",
Message: ".$user_message."

You may also download and read:
1. NDIIT Brochure: Click Here
2. Affiliation & Accreditation: Click Here

In case of any issues, you may write to admission@ndiit.in or call us on +91-9810479477 and +91- 7303335938.

SGI / NDIIT wishes you all the very best for your life and career ahead.

Warm Regards
Admissions Team
New Delhi Institute of Information Technology
Shankara Group of Institutions
"; $headers1 = 'MIME-Version: 1.0' . "\r\n"; $headers1 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers1 .= "From: Shankara Group Web Enquiry" . "\r\n"; mail($visitor_email, $subject1, $body1,$headers1); //end //email to team $to = $your_email; $subject=$fomtype. ": SGI Web Enquiry from ".$fname." ".$lname.""; $from = $visitor_email; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; mysqliQuery('INSERT INTO `contact_us`(`form_type`,`fname`,`lname`,`email`,`phone`,`location`,`course`,`mssg`,`ip_address`,`date_time`) VALUES ("'.$fomtype.'","'.$fname.'","'.$lname.'","'.$visitor_email .'","'.$phone.'","'.$location.'","'.$course.'","'.$user_message.'","'.$ip.'","'.date_zone().'")'); $body = "A user ".$fname." ".$lname." submitted the enquiry form on Shankaragroup.org\n". "First Name: $fname\n". "Last Name: $lname\n". "Email: $visitor_email \n". "Phone: $phone\n". "Location: $location\n". "Course: $course\n". "Message: \n ". "$user_message\n". "IP: $ip\n"; $headers = "From: Shankara Group Web Enquiry" . "\r\n"; mail($to, $subject, $body,$headers); echo ""; header('Location: thank-you'); } } else{ $fomtype='Home Page'; $fname = strip_tags($_POST['fname']); $lname = strip_tags($_POST['lname']); $visitor_email = strip_tags($_POST['email']); $phone= strip_tags($_POST['phone']); $location= strip_tags($_POST['location']); $course = strip_tags($_POST['course']); $user_message = strip_tags($_POST['msg']); if(empty($_SESSION['6_letters_code']) || strcasecmp($_SESSION['6_letters_code'], $_POST['6_letters_code']) != 0) { //Note: the captcha code is compared case insensitively. //if you want case sensitive match, update the check above to // strcmp() //$errors .= "\n The captcha code does not match!"; echo ""; } else { //Email to User $subject1="".$fname." ".$lname.", we have received your web enquiry"; $body1 = "Dear ".$fname." ".$lname.",
Thank You for your interest in Shankara Group of Institutions (SGI) / New Delhi Institute of Information Technology (NDIIT). We have received your web enquiry. Our team will contact you shortly.

A copy of your data submitted is shared here for your reference.
First Name: ".$fname.",
Last Name: ".$lname.",
Email: ".$visitor_email .",
Phone: ".$phone.",
City: ".$location.",
Course: ".$course.",
Message: ".$user_message."

You may also download and read:
1. NDIIT Brochure: Click Here
2. Affiliation & Accreditation: Click Here

In case of any issues, you may write to admission@ndiit.in or call us on +91-9810479477 and +91- 7303335938.

SGI / NDIIT wishes you all the very best for your life and career ahead.

Warm Regards
Admissions Team
New Delhi Institute of Information Technology
Shankara Group of Institutions
"; $headers1 = 'MIME-Version: 1.0' . "\r\n"; $headers1 .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers1 .= "From: Shankara Group Web Enquiry" . "\r\n"; mail($visitor_email, $subject1, $body1,$headers1); //end //email to team $to = $your_email; $subject=$fomtype. ": SGI Web Enquiry from ".$fname." ".$lname.""; $from = $visitor_email; $ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : ''; mysqliQuery('INSERT INTO `contact_us`(`form_type`,`fname`,`lname`,`email`,`phone`,`location`,`course`,`mssg`,`ip_address`,`date_time`) VALUES ("'.$fomtype.'","'.$fname.'","'.$lname.'","'.$visitor_email .'","'.$phone.'","'.$location.'","'.$course.'","'.$user_message.'","'.$ip.'","'.date_zone().'")'); $body = "A user ".$fname." ".$lname." submitted the enquiry form on Shankaragroup.org\n". "First Name: $fname\n". "Last Name: $lname\n". "Email: $visitor_email \n". "Phone: $phone\n". "Location: $location\n". "Course: $course\n". "Message: \n ". "$user_message\n". "IP: $ip\n"; $headers = "From: Shankara Group Web Enquiry" . "\r\n"; mail($to, $subject, $body,$headers); echo ""; header('Location: thank-you'); } } } // Function to validate against any email injection attempts function IsInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } ?>