]][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_upcoming_event where id='$id'"); $row=$sql->fetch_assoc(); $f1 = $row['file']; $f2=$row['heading']; $f3=$row["para"]; if(isset($_POST['update'])){ $title=$_POST["title"]; $p=$_POST["para"]; 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_upcoming_event set heading='$title',file='$im',para='$p' where id='$id' "); echo"<script>alert('Upcoming Events updated'); window.location='upcoming.php'</script>"; } include'include/header.php'; ?> <script src="//cdn.ckeditor.com/4.10.1/standard/ckeditor.js"></script> <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['file'];?>" > <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="title"><b> Title:</b></label><br> <input type="text" id="heading" value="<?php echo $f2 ?>" class="form-control" name="title"> </div> <div class="form-group"> <label for="Paragraph"><b> Content:</b></label><br> <textarea name="para" id="para" class="ckeditor" required><?php echo $f3 ?></textarea> </div> <button type="submit" name="update" class="btn btn-success">Save</button> </form> </div> </div> </div> <?php include'include/footer.php';?>