<?php 
include('includes/config.php');

?>


<?php
include('includes/user_data.php');

?>
<?php
//error_reporting(0);
if(isset($_POST['reg']))
{
$JSS1=$_POST['JSS1'];
$JSS2=$_POST['JSS2'];
$JSS3=$_POST['JSS3'];
$SSS1=$_POST['SSS1'];
$SSS2=$_POST['SSS2'];
$SSS3=$_POST['SSS3'];



$id=1;

$sql = "UPDATE fee SET JSS1='$JSS1', JSS2='$JSS2', JSS3='$JSS3', SSS1='$SSS1', SSS2='$SSS2', SSS3='$SSS3' WHERE id='$id'";

if (mysqli_query($conn, $sql)) {
   $msg="succesfully updated";
//   	$extra="list_student.php";
// 			$host  = $_SERVER['HTTP_HOST'];
// 			$uri  = rtrim(dirname($_SERVER['PHP_SELF']),'/\\');
// 			echo "<script type='text/javascript'> document.location = 'https://$host$uri/$extra'; </script>";
				

// 			$_SESSION['errmsg']="succesfully updated";
// 				exit();
} else {
    $error="something is  wrong"; 
}
  
}  
          ?>
<!doctype html>
<html lang="en">


<!-- Mirrored from codervent.com/rocker/demo/vertical/user-profile.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 26 Aug 2022 06:47:36 GMT -->
<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!--favicon-->
	<link rel="icon" href="assets/images/favicon-32x32.png" type="image/png" />
	<!--plugins-->
	<link href="assets/plugins/simplebar/css/simplebar.css" rel="stylesheet" />
	<link href="assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css" rel="stylesheet" />
	<link href="assets/plugins/metismenu/css/metisMenu.min.css" rel="stylesheet" />
	<!-- loader-->
	<link href="assets/css/pace.min.css" rel="stylesheet" />
	<script src="assets/js/pace.min.js"></script>
	<!-- Bootstrap CSS -->
	<link href="assets/css/bootstrap.min.css" rel="stylesheet">
	<link href="assets/css/bootstrap-extended.css" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&amp;display=swap" rel="stylesheet">
	<link href="assets/css/app.css" rel="stylesheet">
	<link href="assets/css/icons.css" rel="stylesheet">
	<!-- Theme Style CSS -->
	<link rel="stylesheet" href="assets/css/dark-theme.css" />
	<link rel="stylesheet" href="assets/css/semi-dark.css" />
	<link rel="stylesheet" href="assets/css/header-colors.css" />
	<title> FEE</title>
</head>

<body>
	<!--wrapper-->
	<div class="wrapper">
		<!--sidebar wrapper -->
		<?php include 'includes/side.php'; ?>
		<!--end sidebar wrapper -->
		<!--start header -->
		<?php include 'includes/head.php'; ?>
		<!--end header -->
		<!--start page wrapper -->
		<div class="page-wrapper">
        <div class="row">
		<div class="row">
      <div class="col-md-3 col-sm-0">
        
      </div>
      
      <div class="col-md-6 col-sm-8">
        <div class="profile_wrap" style="  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
 border-radius: 20px; padding: 10px; margin-top:5%; ">
<!--<form name="chngpwd" method="post" >-->
        
            <div class="gray-bg field-title">
              <h6 class="text-center">     UPDATE FEE</h6>
            </div>


								<div class="alert alert-success border-0 bg-success alert-dismissible fade show py-2">
									<div class="d-flex align-items-center">
										<div class="font-35 text-white"><i class='bx bxs-check-circle'></i>
										</div>
										<div class="ms-3">
											<h6 class="mb-0 text-white"> Info</h6>
											<div class="text-white"><?php if($error){?><div class="errorWrap" style="color:red;"><strong>ERROR</strong>:<?php echo htmlentities($error); ?> </div><?php } 
        else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg); ?> </div><?php }?></div>
										</div>
									</div>
									<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
								</div>






             
           	<div class="form-body">
           	    <?php 
$id=1;
$sql ="SELECT * from fee where id=:id";
$query = $dbh -> prepare($sql);
$query-> bindParam(':id', $id, PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{	?>
										<form class="row g-3" action="" method="post">
										
											<div class="col-12">
												<label for="inputEmailAddress" class="form-label">JSS1 </label>
												
												<textarea name="JSS1" type="text" class="form-control" value="" rows="5" cols="30" ><?php echo htmlentities($result->JSS1);?></textarea>
											</div>
												<div class="col-12">
												<label for="inputEmailAddress" class="form-label">JSS2 </label>
												
												<textarea name="JSS2" type="text" class="form-control" value="" rows="5" cols="30" ><?php echo htmlentities($result->JSS2);?></textarea>
											</div>
												<div class="col-12">
												<label for="inputEmailAddress" class="form-label">JSS3 </label>
												
												<textarea name="JSS3" type="text" class="form-control" value="" rows="5" cols="30" ><?php echo htmlentities($result->JSS3);?></textarea>
											</div>
												<div class="col-12">
												<label for="inputEmailAddress" class="form-label">SSS1 </label>
												
												<textarea name="SSS1" type="text" class="form-control" value="" rows="5" cols="30" ><?php echo htmlentities($result->SSS1);?></textarea>
											</div>
												<div class="col-12">
												<label for="inputEmailAddress" class="form-label">SSS2 </label>
												
												<textarea name="SSS2" type="text" class="form-control" value="" rows="5" cols="30" ><?php echo htmlentities($result->SSS2);?></textarea>
											</div>
												<div class="col-12">
												<label for="inputEmailAddress" class="form-label">SSS3 </label>
												
												<textarea name="SSS3" type="text" class="form-control" value="" rows="5" cols="30" ><?php echo htmlentities($result->SSS3);?></textarea>
											</div>
											
											
										
											<div class="col-12">
												<div class="d-grid">
													<button type="submit" name='reg' class="btn btn-primary"><i class='bx bx-user'></i>Update </button>
												</div>
											</div>
										</form>
								 <?php }} ?>
									</div>
        </div>
      </div>
    </div>
				</div>
				<!--end row-->
		</div>
		<!--end page wrapper -->
		<!--start overlay-->
		<div class="overlay toggle-icon"></div>
		<!--end overlay-->
		<!--Start Back To Top Button--> <a href="javaScript:;" class="back-to-top"><i class='bx bxs-up-arrow-alt'></i></a>
		<!--End Back To Top Button-->
		<footer class="page-footer">
			<p class="mb-0">Copyright © 2021. All right reserved.</p>
		</footer>
	</div>
	<!--end wrapper-->
	<!--start switcher-->
	<?php include 'includes/customiser.php'; ?>

	<!--end switcher-->
	<!-- Bootstrap JS -->
	<script src="assets/js/bootstrap.bundle.min.js"></script>
	<!--plugins-->
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/plugins/simplebar/js/simplebar.min.js"></script>
	<script src="assets/plugins/metismenu/js/metisMenu.min.js"></script>
	<script src="assets/plugins/perfect-scrollbar/js/perfect-scrollbar.js"></script>
	<!--app JS-->
	<script src="assets/js/app.js"></script>
</body>


<!-- Mirrored from codervent.com/rocker/demo/vertical/user-profile.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 26 Aug 2022 06:47:36 GMT -->
</html>