<?php
include './header.php';
$imgName = NULL;
$success = NULL;
$error = NULL;
$id = $_GET['id'];
$getimagename = getCertificatsImageById($id);
$imageold = $getimagename['image_name'];
if (isset($_POST['save-data'])) {
$editGallery = editCertificatsImageById($_POST, $_FILES, $id, $imageold);
if ($editGallery) {
$success = 'Success Update Certificats';
} else {
$reer = 'oops';
}
}
$certificat = getCertificatsImageById($id);
?>
<!-- MAIN SITE WRAPPER-->
<div class="content-wrapper">
<!--container-->
<div class="container">
<!--banner-->
<div class="row">
<div class="col-md-12">
<h1 class="page-head-line">Edit Gallery </h1>
</div>
</div>
<!--end banner-->
<!--new image add form-->
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
Edit Gallery Image
</div>
<div class="panel-body">
<form method="post" action="" enctype="multipart/form-data">
<div class="form-group">
<?php if (!empty($success)) { ?>
<div class="alert alert-success" style="margin-top: 15px ">
<a href="" class="close" data-dismiss="alert" aria-label="close">×</a>
<strong>Success! </strong> <?php echo $success; ?>
</div>
<?php } ?>
</div>
<div class="form-group">
<label for="imageName">Select Image</label>
<input name="image" type="file" id="exampleInputFile" />
</div>
<div class="form-group">
<label for="caption">Certificats Title</label>
<input type="text" name="title" value="<?php echo $certificat['title']; ?>" class="form-control" id="exampleInputCaption" />
</div>
<button type="submit" name="save-data" value="Save" class="btn btn-default">Save</button>
</form>
</div>
</div>
</div>
</div>
<!--end new image add form-->
<div class="row" style="height: 40px;">
</div>
</div>
<!--end container-->
</div>
<!--END MAIN SITE WRAPPER-->
<?php
include './footer.php';
|