\r\n"; // Prevent header injection $headers = preg_replace("/[\r\n]+/", "", $headers); // Send email (using mail() — replace with PHPMailer if needed) $mail_sent = false; if (filter_var($admin_email, FILTER_VALIDATE_EMAIL)) { // Note: many hosts require proper SMTP. If mail() fails to deliver, use PHPMailer with SMTP. $mail_sent = @mail($admin_email, $subject, $body, $headers); } // Save to CSV (append). Fields: datetime, name, email, phone, country, source, message $record = [ date('Y-m-d H:i:s'), $name, $email, $phone, $country, $source, str_replace(["\r\n", "\n", "\r"], ['\\n','\\n','\\n'], $message) // escape newlines ]; $saved = false; $fp = @fopen($csv_file, 'a'); if ($fp) { // If file is new, add header row if (filesize($csv_file) === 0) { fputcsv($fp, ['datetime','name','email','phone','country','source','message']); } fputcsv($fp, $record); fclose($fp); $saved = true; } // Mark last submit time $_SESSION['last_contact_submit'] = $now; // Prepare success message $success_message = "Thank you, " . e($name) . "! Your message was sent successfully."; if (!$mail_sent) { $success_message .= " (Email sending may not be configured on this server. Your message was saved.)"; } } } ?> Contact Us — Quranest World Institute

Contact Quranest World Institute

We’ll respond within 24 hours. Book a free trial via WhatsApp if you prefer instant contact.

There were some problems with your submission:
By submitting you agree to be contacted. We respect your privacy.
© Quranest World Institute — All rights reserved


SEO Keywords:
Contact Quran Academy, Quranest Contact, Enroll Quran Classes, Islamic Course Registration, Online Madrasa Support