| Server IP : 199.79.63.27 / Your IP : 216.73.216.250 Web Server : Microsoft-IIS/10.0 System : Windows NT MD-PLESK-WEB5 10.0 build 20348 (Windows Server 2022) AMD64 User : IWPD_6698(lcitec7i) ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/INETPUB/VHOSTS/lcit.edu.in/lcitps.edu.in/ |
Upload File : |
<?php
include 'db.php'; // Include database connection
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$applicant_name = $_POST['applicant_name'];
$father_name = $_POST['father_name'];
$mother_name = $_POST['mother_name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$address = $_POST['address'];
$previous_class = $_POST['previous_class'];
$old_school = $_POST['old_school'];
$class = $_POST['class'];
$stream = isset($_POST['stream']) ? $_POST['stream'] : NULL;
// Prepare SQL query
$sql = "INSERT INTO admissions (applicant_name, father_name, mother_name, phone, email, address, previous_class, old_school, class, stream)
VALUES ('$applicant_name', '$father_name', '$mother_name', '$phone', '$email', '$address', '$previous_class', '$old_school', '$class', '$stream')";
if ($conn->query($sql) === TRUE) {
echo "<script>alert('Form submitted successfully!'); window.location.href='admission_form.php';</script>";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
// Close connection
$conn->close();
}
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>