| Server IP : 199.79.63.27 / Your IP : 216.73.217.151 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/lcitbb/ |
Upload File : |
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
// Include database connection
include 'db.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$stmt = $conn->prepare("INSERT INTO admissions
(applicant_name, father_name, mother_name, phone, email, address, previous_class, old_school, class, stream ,Sub_Stream)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param("sssssssssss",
$_POST['applicant_name'], $_POST['father_name'], $_POST['mother_name'], $_POST['phone'],
$_POST['email'], $_POST['address'], $_POST['previous_class'], $_POST['old_school'],
$_POST['class'], $_POST['Stream'], $_POST['Sub_Stream']); // Fixed key reference
if ($stmt->execute()) {
echo "<script>alert('Form submitted successfully!');</script>";
} else {
echo "Error: " . $stmt->error;
}
$stmt->close();
$conn->close();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admission Form</title>
<?php include 'alllinks.php'; ?>
<script>
function showStream() {
var classDropdown = document.getElementById("class");
var streamDropdown = document.getElementById("streamDiv");
var sub_streamDropdown = document.getElementById("sub_streamDiv");
if (classDropdown.value === "11" || classDropdown.value === "12") {
streamDropdown.style.display = "block";
sub_streamDropdown.style.display = "block";
} else {
streamDropdown.style.display = "none";
sub_streamDropdown.style.display = "none";
}
}
var StreamObject = {
"Biology": ["Biology and Computer Science", "Biology and Physical Education", "Biology and Maths"],
"Mathematics": ["Maths and Computer Science", "Maths and Physical Education"],
"Commerce": ["Commerce and Applied Science", "Commerce and Physical Education", "Commerce and Informatics Practices"],
"Humanities": ["Humanities and Physical Education"]
};
window.onload = function() {
var streamSel = document.getElementById("Stream");
var subStreamSel = document.getElementById("Sub_Stream");
var displayArea = document.getElementById("selectedValues");
for (var stream in StreamObject) {
streamSel.options[streamSel.options.length] = new Option(stream, stream);
}
streamSel.onchange = function() {
subStreamSel.innerHTML = '<option value="">Please select Sub Stream</option>';
var selectedStream = this.value;
if (selectedStream && StreamObject[selectedStream]) {
var subStreams = StreamObject[selectedStream];
subStreams.forEach(function(subStream) {
subStreamSel.options[subStreamSel.options.length] = new Option(subStream, subStream);
});
}
// Update the variable and display selected value
updateSelection();
};
subStreamSel.onchange = function() {
// Update the variable and display selected value
updateSelection();
};
function updateSelection() {
var selectedStream = streamSel.value;
var selectedSubStream = subStreamSel.value;
displayArea.innerHTML = `Selected Stream: <strong>${selectedStream}</strong> <br> Selected Sub Stream: <strong>${selectedSubStream}</strong>`;
}
};
</script>
<style>
.btd{
padding: 7px;
border: 1px solid #ced4da;
}
</style>
</head>
<body>
<?php include 'BLOOMING_BUDS_Novbar.php'; ?>
<section class=" " style="background-color: #efefef; margin-top:100px;">
<div class="container py-5 ">
<div class="row d-flex justify-content-center align-items-center ">
<div class="col-lg-8 col-xl-6">
<div class="card rounded-3">
<img src="assets/images/lcitPublicSchool.PNG"
class="w-100" style="border-top-left-radius: .3rem; border-top-right-radius: .3rem;" alt="Sample photo">
<div class="card-body p-4 p-md-5">
<h3 class="mb-4 pb-2 pb-md-0 mb-md-5 px-md-2">Admission Form</h3>
<form action="" method="post" class="px-md-2">
<div class="row">
<!-- Left Column -->
<div class="col-md-6">
<div class="form-outline mb-4">
<label class="form-label">Applicant Name</label>
<input type="text" name="applicant_name" class="form-control" required />
</div>
<div class="form-outline mb-4">
<label class="form-label">Father's Name</label>
<input type="text" name="father_name" class="form-control" required />
</div>
<div class="form-outline mb-4">
<label class="form-label">Phone Number</label>
<input type="text" name="phone" class="form-control" required />
</div>
<div class="form-outline mb-4">
<label class="form-label">Address</label>
<textarea name="address" class="form-control" required></textarea>
</div>
<div class="form-outline mb-4">
<label class="form-label">Previous Class (Optional)</label>
<input type="text" name="previous_class" class="form-control" />
</div>
</div>
<!-- Right Column -->
<div class="col-md-6">
<div class="form-outline mb-4">
<label class="form-label">Mother's Name</label>
<input type="text" name="mother_name" class="form-control" required />
</div>
<div class="form-outline mb-4">
<label class="form-label">Email ID</label>
<input type="email" name="email" class="form-control" required />
</div>
<div class="form-outline mb-4">
<label class="form-label">Old School Name (Optional)</label>
<input type="text" name="old_school" class="form-control" />
</div>
<div class="mb-4">
<select name="class" id="class" class="form-select btd" onchange="showStream()" required>
<option disabled selected>Choose Class</option>
<option value="nursery">Nursery</option>
<?php
for ($i = 1; $i <= 12; $i++) {
echo "<option value='$i'>Class $i</option>";
}
?>
</select>
</div>
<div class="mb-4" id="streamDiv" style="display: none;">
Stream:
<select name="Stream" id="Stream">
<option value="" selected="selected">Please select Stream</option>
</select>
</div>
<div class="mb-4" id="sub_streamDiv" style="display: none;">
Sub Stream:
<select name="Sub_Stream" id="Sub_Stream">
<option value="" selected="selected">Please select Sub Stream</option>
</select>
</div>
</div>
</div>
<button type="submit" class="btn btn-lg mt-3 text-light" style="background-color:#fc9928; ">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- footer area start -->
<?php include 'Footer.php'; ?>
<!-- footer area end -->
<!-- jquery latest version -->
<script src="assets/js/vendor/jquery-2.2.4.min.js"></script>
<!-- bootstrap 4 js -->
<script src="assets/js/bootstrap.min.js"></script>
<!-- others plugins -->
<script src="assets/js/owl.carousel.min.js"></script>
<script src="assets/js/jquery.magnific-popup.min.js"></script>
<script src="assets/js/jquery.slicknav.min.js"></script>
<script src="assets/js/plugins.js"></script>
<script src="assets/js/scripts.js"></script>
<script>
$(document).ready(function() {
// get video source from data-src button
var $videoSrc;
$('.video-btn').click(function() {
$videoSrc = $(this).data( "src" );
});
console.log($videoSrc);
// autoplay video on modal load
$('#myModal').on('shown.bs.modal', function (e) {
// youtube iframe configuration and settings
$("#video").attr('src',$videoSrc + "?autoplay=1&rel=0&controls=1&loop=1&modestbranding=1");
})
// stop playing the youtube video when modal closed
$('#myModal').on('hide.bs.modal', function (e) {
// stop video
$("#video").attr('src',$videoSrc);
})
});
</script>
</body>
</html>