Server IP : 103.191.208.50 / Your IP : 216.73.216.53 Web Server : LiteSpeed System : Linux orion.herosite.pro 4.18.0-553.53.1.lve.el8.x86_64 #1 SMP Wed May 28 17:01:02 UTC 2025 x86_64 User : celkcksm ( 1031) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, popen, exec MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home/celkcksm/jrslawcollege.com/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php // Your WhatsApp number $whatsapp_number = "918240200599"; // Change to your number // Collect form data $name = urlencode($_GET['name']); $dob = urlencode($_GET['dob']); $gender = urlencode($_GET['gender']); $parentName = urlencode($_GET['parentName']); $phone = urlencode($_GET['phone']); $email = urlencode($_GET['email']); $enquiryType = urlencode($_GET['enquiry-type']); $course = urlencode($_GET['course']); $address = urlencode($_GET['address']); $remarks = isset($_GET['remarks']) ? urlencode($_GET['remarks']) : 'N/A'; // Create WhatsApp message $whatsapp_message = "New Admission Enquiry Received 🏫\n\n"; $whatsapp_message .= "Student Name: $name\n"; $whatsapp_message .= "DOB: $dob\n"; $whatsapp_message .= "Gender: $gender\n"; $whatsapp_message .= "Parent's Name: $parentName\n"; $whatsapp_message .= "Contact: $phone\n"; $whatsapp_message .= "Email: $email\n"; $whatsapp_message .= "Enquiry Type: $enquiryType\n"; $whatsapp_message .= "Course: $course\n"; $whatsapp_message .= "Address: $address\n"; $whatsapp_message .= "Remarks: $remarks\n"; // Redirect to WhatsApp $whatsapp_url = "https://wa.me/$whatsapp_number?text=" . urlencode($whatsapp_message); header("Location: $whatsapp_url"); exit; ?> <?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'php_mailer/Exception.php'; require 'php_mailer/PHPMailer.php'; require 'php_mailer/SMTP.php'; if ($_SERVER["REQUEST_METHOD"] == "POST") { // Collect POST data $name = $_POST['name'] ?? ''; $dob = $_POST['dob'] ?? ''; $gender = $_POST['gender'] ?? ''; $parentName = $_POST['parentName'] ?? ''; $phone = $_POST['phone'] ?? ''; $email = $_POST['email'] ?? ''; $enquiryType = $_POST['enquiry-type'] ?? ''; $course = $_POST['course'] ?? ''; $address = $_POST['address'] ?? ''; $remarks = $_POST['remarks'] ?? 'N/A'; // Validate required fields if (!$name || !$dob || !$gender || !$parentName || !$phone || !$email || !$enquiryType || !$course || !$address) { echo "All required fields must be filled."; exit; } $mail = new PHPMailer(true); try { // Server settings $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; // 🔁 Replace with your SMTP server $mail->SMTPAuth = true; $mail->Username = 'ncriptech9@gmail.com'; // 🔁 Your SMTP email $mail->Password = 'klhx attj hsep kdrh'; // 🔁 Your SMTP password or app password $mail->SMTPSecure = 'tls'; $mail->Port = 587; // Sender and recipient $mail->setFrom('ncriptech9@gmail.com', 'Admission Portal'); $mail->addAddress('apurbakhanra09@gmail.com', 'Admissions Team'); // 🔁 Change to your recipient // Email content $mail->isHTML(true); $mail->Subject = 'New Admission Form Submission'; $mail->Body = " <h2>Admission Form Details</h2> <p><strong>Student Name:</strong> {$name}</p> <p><strong>Date of Birth:</strong> {$dob}</p> <p><strong>Gender:</strong> {$gender}</p> <p><strong>Parent's Name:</strong> {$parentName}</p> <p><strong>Phone:</strong> {$phone}</p> <p><strong>Email:</strong> {$email}</p> <p><strong>Enquiry Type:</strong> {$enquiryType}</p> <p><strong>Course:</strong> {$course}</p> <p><strong>Address:</strong> {$address}</p> <p><strong>Remarks:</strong> {$remarks}</p> "; $mail->send(); echo "Form submitted successfully. Mail sent."; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: " . $mail->ErrorInfo; } } else { echo "Invalid request method."; } ?> <!-- ------------------------------------------------------------ --> <?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'php_mailer/Exception.php'; require 'php_mailer/PHPMailer.php'; require 'php_mailer/SMTP.php'; if ($_SERVER["REQUEST_METHOD"] == "POST") { // Collect POST data $name = $_POST['name'] ?? ''; $dob = $_POST['dob'] ?? ''; $gender = $_POST['gender'] ?? ''; $parentName = $_POST['parentName'] ?? ''; $phone = $_POST['phone'] ?? ''; $email = $_POST['email'] ?? ''; $enquiryType = $_POST['enquiry-type'] ?? ''; $course = $_POST['course'] ?? ''; $address = $_POST['address'] ?? ''; $remarks = $_POST['remarks'] ?? 'N/A'; // Validate required fields if (!$name || !$dob || !$gender || !$parentName || !$phone || !$email || !$enquiryType || !$course || !$address) { echo "All required fields must be filled."; exit; } $mail = new PHPMailer(true); try { // Server settings $mail->isSMTP(); $mail->Host = 'smtp.gmail.com'; // 🔁 Replace with your SMTP server $mail->SMTPAuth = true; $mail->Username = 'waytoadmissions21@gmail.com'; // 🔁 Your SMTP email $mail->Password = 'lgle pkre mzzy sebw'; // 🔁 Your SMTP password or app password $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; $mail->Port = 465; // Sender and recipient $mail->setFrom('waytoadmissions21@gmail.com', 'Admission Portal'); // $mail->addAddress('ananyachoudhury32@gmail.com', 'Admissions Team'); $mail->addAddress('jrsetcle@gmail.com', 'Admissions Team'); // Email content $mail->isHTML(true); $mail->Subject = 'New Admission Form Submission'; $mail->Body = " <h2>Admission Form Details</h2> <p><strong>Student Name:</strong> {$name}</p> <p><strong>Date of Birth:</strong> {$dob}</p> <p><strong>Gender:</strong> {$gender}</p> <p><strong>Parent's Name:</strong> {$parentName}</p> <p><strong>Phone:</strong> {$phone}</p> <p><strong>Email:</strong> {$email}</p> <p><strong>Enquiry Type:</strong> {$enquiryType}</p> <p><strong>Course:</strong> {$course}</p> <p><strong>Address:</strong> {$address}</p> <p><strong>Remarks:</strong> {$remarks}</p> "; $mail->send(); echo "Form submitted successfully. Mail sent."; } catch (Exception $e) { echo "Message could not be sent. Mailer Error: " . $mail->ErrorInfo; } } else { echo "Invalid request method."; } ?>