]][ahhhhhhhfgfgdsfstrrrttrfwerwerwerdgdgrrreeteetffwerwerwerwerdsddfgh
במ12[aspddfsdfsdfdretetdfgioifngttrtrtrtrtrgsd g ggk ffghdsfaswerwerwerwerwvbnvfdgdgfbnasd asdaioioidgh;';';'
/
home
/
diginqyo
/
public_html
/
natanamstudio.in
/
stud-admin
/
Upload FileeE
HOME
<?php session_start(); if(!isset($_SESSION['un'])){ header("Location:login.php"); exit; } $id=$_GET['id']; include'include/config.php'; $sql=$conn->query("select * from grand_decor where id='$id'"); $row=$sql->fetch_assoc(); $f1 = $row['img']; // $f2=$row['heading']; if(isset($_POST['update'])){ // $he=$_POST["he"]; if($_FILES["file"]["error"]==0) { $im = $_FILES['file']['name']; move_uploaded_file($_FILES['file']['tmp_name'], "images/".$im); } else { $im=$_POST["img"]; } $conn->query("update grand_decor set img='$im' where id='$id' "); echo"<script>alert('images updated'); window.location='decor.php'</script>"; } include'include/header.php'; ?> <div class="content-wrapper"> <div class="container-fluid"> <!-- Breadcrumbs--> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="gala_conference.php">Home</a> </li> <li class="breadcrumb-item active">Images:</li> </ol> <!-- Icon Cards--> <!-- Area Chart Example--> <div class="card mb-3"> <div class="card-header"> Change Images:</div> <div class="card-body"> <form method="post" enctype="multipart/form-data"> <input type="hidden" name="img" value="<?php echo $row['img'];?>" > <div class="form-group"> <label for="image"><b> Image:</b></label><br> <img src="images/<?php echo $f1 ?>" height="150px" width="150px"> <input type="file" id="image" class="form-control" name="file"> </div> <!-- <div class="form-group"> <label for="heading"><b> Heading:</b></label><br> <input type="text" id="heading" value="<?php // echo $f2 ?>" class="form-control" name="he"> </div> --> <button type="submit" name="update" class="btn btn-success">Save</button> </form> </div> </div> </div> <?php include'include/footer.php';?>