]]jkjjgdjffksdkdfdkasertertertrtetsadskdfgjdskfgj
במ12[aspddfasdaertertertertetghjghjsadasbvxcvxcv;'
/
home
/
u181040597
/
domains
/
jyotielevator.com
/
public_html
/
admin
/
Upload FileeE
HOME
<?php include("header.php"); include("aside.php"); $id = $_GET['id']; $select = "SELECT * FROM `gallery` WHERE `id` = '$id'"; $query = mysqli_query($connect, $select); $row = mysqli_fetch_assoc($query); $update_img = $row['gallery']; if (isset($_POST['submit'])) { $image = $_FILES['image']['name']; $img_path = "./gallery/" . $image; $update = "UPDATE `gallery` SET `gallery`='$image' WHERE `id`='$id'"; $sql = mysqli_query($connect, $update); if ($sql) { unlink("./gallery/" . $update_img); move_uploaded_file($_FILES['image']['tmp_name'], $img_path); echo('update successful'); // header('location: data_gallery.php'); } else { echo "Data did not update: " . mysqli_error($connect); } } ?> <div class="container w-100 h-100 mt-5"> <button> <a class="btn btn-outline-primary" href="data_gallery.php">View Data</a></button> <!--<button> <a class="btn btn-outline-primary" href="hoteltable.php">Hotel</a></button>--> <!--<button> <a class="btn btn-outline-primary" href="imagesform.php">Gallery</a></button>--> <h3 class="text-center">Luxery Deals</h3> <div class="row"> <div class="col-md-9 mt-5"> <form method="post" enctype="multipart/form-data"> <div class="form-group"> <label for="exampleInputEmail1">Product Gallery:</label> <input type="file" class="form-control" name="image" id="exampleInputEmail1" aria-describedby="emailHelp"> </div> <div class="form-check"> <input type="checkbox" class="form-check-input" id="exampleCheck1"> <label class="form-check-label" for="exampleCheck1">Check me out</label> </div> <button type="submit" class="btn btn-primary" name="submit">Submit</button> </form> </div> </div> </div> <?php include("footer.php"); ?>