View file File name : edit-tour-package.php Content :<?php include './header.php'; $imgName = NULL; $success = NULL; $error = NULL; $id = $_GET['id']; $getimagename = getTourPackageById($id); $imageold = $getimagename['image_name']; if (isset($_POST['save-data'])) { $editpackage = editTourPackagesById($_POST, $_FILES, $id, $imageold); if ($editpackage) { $success = 'Successfully Update Tour-Package'; } else { $reer = 'oops'; } } $Packagebyid = getTourPackageById($id); $tourtypes = getTourPackageById($id); ?> <script src="tinymce/js/tinymce/tinymce.min.js"></script> <script> tinymce.init({ selector: "#longText", // =========================================== // INCLUDE THE PLUGIN // =========================================== plugins: [ "advlist autolink lists link image charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste" ], // =========================================== // PUT PLUGIN'S BUTTON on the toolbar // =========================================== toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image jbimages", // =========================================== // SET RELATIVE_URLS to FALSE (This is required for images to display properly) // =========================================== relative_urls: false }); </script> <!-- 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">Manage Tour Package </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 Tour Package </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 500 pixels</p> </div> <div class="form-group"> <label for="imageTitle">Title</label> <input type="text" name="title" class="form-control" value="<?php echo $Packagebyid['title']; ?>" id="title" placeholder="Enter Title"/> </div> <div class="form-group"> <label for="duration">Duration</label> <input type="text" name="duration" class="form-control" value="<?php echo $Packagebyid['duration']; ?>" id="duration" placeholder="Enter Tur Duration"/> </div> <input type="hidden" name="price" class="form-control" value="<?php echo $Packagebyid['price']; ?>" id="price" placeholder="Enter Title"/> <div class="form-group"> <label for="map" >Map</label> <textarea name="map" class="form-control" rows="2"><?php echo $Packagebyid['map']; ?> </textarea> </div> <div class="form-group"> <label for="shortDescription">Short Description</label> <input type="text" name="shortDescription" class="form-control" value="<?php echo $Packagebyid['shortDescription']; ?>" id="shortDescription" placeholder="Enter Title"/> </div> <div class="form-group"> <label for="description" >Description: </label> <textarea id="longText" name="description" class="form-control" rows="5"><?php echo $Packagebyid['description']; ?> </textarea> </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> <!--end container--> </div> <!--END MAIN SITE WRAPPER--> <?php include './footer.php';