/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/subjectsEditData.php
<?php
include('include/header.php');
if(!empty($_GET['edit'])){
$select = select_Subject($_GET['edit']);
$branch = mysqli_fetch_array($select);
}
$select_academic=select_academic();
$select_class=select_class();
$select_SyllabusData = select_SyllabusData();
?>
<main id="main" class="main">
<div class="pagetitle">
<h1>Apple IIT Schools</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.php">Home</a></li>
<li class="breadcrumb-item active">Subjects Edit</li>
</ol>
</nav>
</div><!-- End Page Title -->
<section class="section">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5 class="card-title">Update Subjects</h5>
<?php
if(!empty($_POST['submit'])){
subject_editData();
}
?>
<form method="post" onsubmit="return book_validation()">
<div class="row">
<div class="col-md-3 mt-4">
<label for="exampleInputEmail1" class="form-label">Class Name</label>
<select name="class_name" id="class_name" class="form-control" onChange="select_section(this.value)">
<?php
while($class = mysqli_fetch_array($select_class)){
?>
<option value="<?= $class['name']?>" <?php if($class['name']== $branch['class']){ echo 'selected';} ?>><?= $class['name']?></option>
<?php
}
?>
</select>
</div>
<div class="col-md-3 mt-4">
<label for="exampleInputEmail1" class="form-label">Class Section</label>
<select name="section" id="section" class="form-control">
<option value="<?= $branch['section']?>"><?= $branch['section']?></option>
</select>
</div>
<div class="col-md-3 mt-4">
<label for="exampleInputEmail1" class="form-label">Syllabus Type</label>
<select name="syllabus" id="syllabus" class="form-control">
<option value="">Please Select Class</option>
<?php
while($syllabus = mysqli_fetch_array($select_SyllabusData)){
?>
<option value="<?= $syllabus['name']?>" <?php if($syllabus['name'] ==$branch['syllabus']){ echo 'selected';}?>><?= $syllabus['name']?></option>
<?php
}
?>
</select>
</div>
<div class="col-md-3 mt-4">
<label for="exampleInputEmail1" class="form-label">Subject Name</label>
<input type="text" class="form-control" id="subject_name" name="subject_name" value="<?= $branch['subject']?>">
</div>
</div>
<input type="hidden" name="edit_data" value="<?= $branch['id']?>">
<div class="mt-4">
<input type="submit" class="btn btn-primary" value="Update" name="submit">
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</main>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script>
function book_validation()
{
var branchname = $('#branch_name').val();
var academic = $('#academic').val();
if(branchname == '')
{
swal('Please Enter Branch Name');
return false;
}
else{
return true;
}
}
</script>
<script>
function select_section(val){
if(val !=''){
$.ajax({
url : "section.php",
data : {val : val},
type : 'POST',
success : function(response) {
$('#section').html(response);
}
});
}
}
</script>
<?php include('include/footer.php'); ?>
@LwBee Strong Bypass
Upload File
Create New File