View file File name : edit-photo-gallery.php Content :<?php include './header.php'; $imgName = NULL; $success = NULL; $error = NULL; $id = $_GET['id']; $getimagename = getImageGalleryById($id); $imageold = $getimagename['image-name']; if (isset($_POST['save-data'])) { $editGallery = editImageGalleryById($_POST, $_FILES, $id, $imageold); if ($editGallery) { $success = 'Success Edit Photo Gallery'; } else { $reer = 'oops'; } } $imagebyid = getImageGalleryById($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="image"/> <p class="help-block">Automaticity cropping this image 900 X 600 pixels</p> </div> <div class="form-group"> <label for="caption">Caption</label> <input type="text" name="caption" value="<?php echo $imagebyid['caption']; ?>" class="form-control" id="caption" placeholder="Enter Image Caption" required="TRUE"/> </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';