hjkhghghop'sdvsdvsdvsddsvsdvsddssfsddsfsfsdghgt
bnmbertsu,op'op'sdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf'tdfg
/
home
/
u797489378
/
domains
/
musicndance.in
/
public_html
/
admin
/
Upload FileeE
HOME
<?php ob_start(); include('connection.inc.php'); include('sidebar.inc.php'); include('header.inc.php'); if (isset($_GET['id'])) { $id = $_GET['id']; $image = $_GET['image']; if (isset($_POST['submit'])) { $imageb = $_FILES['image']['name']; $imageb_path = "./photos/" . $imageb; if ($imageb == "") { $sql = "UPDATE `gallery` Set `image`='$image' Where id ='$id'"; $query = mysqli_query($con, $sql) or die("error"); if ($query) { header('location:Combo.php'); } } else { $sql = "UPDATE `gallery` Set `image`='$imageb' Where id ='$id'"; $query = mysqli_query($con, $sql) or die("error"); if ($query) { unlink("./photos/" . $image); move_uploaded_file($_FILES['image']['tmp_name'], $imageb_path); header('location:Combo.php'); } } } } ?> <form method="POST" enctype="multipart/form-data"> <div class="form-group"> <label for="exampleInputEmail1">Image</label> <input type="file" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" name="image"> </div> <button type="submit" class="btn btn-primary" name="submit" value="submit">Submit</button> </form> <?php include('footer.inc.php'); ob_flush(); ?>