<!DOCTYPE html>
<html lang="en">
<?php session_start(); ?>
<?php include "../includes/db.php" ?>
<?php include "../admin/includes/header.php" ?>
<?php
if(isset($_GET['edit'])){
$post_id=$_GET['edit'];
$delete_img_query="SELECT * FROM careers WHERE id={$post_id}";
$delete_file=mysqli_query($connection,$delete_img_query);
$fetch=mysqli_fetch_assoc($delete_file);
}
$message="";
?>
<body>
<div class="container-scroller">
<?php include "../admin/includes/topbar.php" ?>
<div class="container-fluid page-body-wrapper">
<?php include "../admin/includes/nav.php" ?>
<!-- partial -->
<div class="main-panel">
<div class="content-wrapper">
<div class="page-header">
<h3 class="page-title">Manage Career</h3>
<nav aria-label="breadcrumb">
<!-- <ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Forms</a></li>
<li class="breadcrumb-item active" aria-current="page">Form elements</li>
</ol> -->
</nav>
</div>
<div class="row">
<div class="col-12 grid-margin stretch-card">
<div class="card">
<div class="card-body">
<h4 class="card-title">Edit Career</h4>
<p class="card-description"></p>
<?php
if(isset($_SESSION['messages'])){
echo "<div class='alert alert-primary'>";
echo "<span class='glyphicon glyphicon-remove'></span> ".$_SESSION['messages']."<br>";
echo "</div>";
unset($_SESSION['messages']);
}
?>
<form class="forms-sample" id="submitForm" action="view_career.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="post_id" value="<?php echo $_GET['edit'] ?>">
<div class="form-group">
<label for="exampleInputName1">Title</label>
<input type="text" class="form-control" id="exampleInputName1" placeholder="Title" name="title" value="<?php echo $fetch['title']?>" required="">
</div>
<div class="form-group">
<label for="exampleInputName1">End Date</label>
<input type="date" class="form-control" id="exampleInputName1" placeholder="End Date" name="date" required="" value="<?php echo $fetch['end_date']?>">
</div>
<div class="form-group">
<label for="exampleTextarea1">Description</label>
<textarea class="form-control" name="description" id="exampleTextarea1" rows="4" placeholder="Description" required><?php echo $fetch['description']?></textarea>
</div>
<button type="submit" name="edit" class="btn btn-primary mr-2">Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- content-wrapper ends -->
<?php include "../admin/includes/footer.php" ?>
</div>
<!-- main-panel ends -->
</div>
<!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->
<!-- plugins:js -->
<script src="./vendors/js/vendor.bundle.base.js"></script>
<!-- endinject -->
<!-- Plugin js for this page -->
<script src="./vendors/select2/select2.min.js"></script>
<script src="./vendors/typeahead.js/typeahead.bundle.min.js"></script>
<!-- End plugin js for this page -->
<!-- inject:js -->
<script src="./js/misc.js"></script>
<!-- endinject -->
<!-- Custom js for this page -->
<script src="./js/typeahead.js"></script>
<script src="./js/select2.js"></script>
<script src="./js/jquery-3.6.0.min.js"></script>
<script src="./js/jquery.validate.min.js"></script>
<script type="text/javascript">
$('#submitForm').validate();
</script>
<!-- End custom js for this page -->
</body>
</html> |