]][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 stud_team where id='$id'"); $row=$sql->fetch_assoc(); $f1 = $row['img']; $f11 = $row['pdf']; $f2=$row['heading']; if(isset($_POST['update'])){ $he=$_POST["he"]; $contents=$_POST['contents']; $url = preg_replace('/[^a-zA-Z0-9_.]/', '-', strtolower($he)); if($_FILES["file"]["error"]==0) { $im = $_FILES['file']['name']; move_uploaded_file($_FILES['file']['tmp_name'], "images/".$im); } else { $im=$_POST["img"]; } if($_FILES["file1"]["error"]==0) { $im1 = $_FILES['file1']['name']; move_uploaded_file($_FILES['file1']['tmp_name'], "images/".$im1); } else { $im1=$row['pdf'];; } $conn->query("update stud_team set img='$im',heading='$he' ,heading_url='$url',contents='$contents',pdf='$im1' where id='$id' "); echo"<script>alert('team updated'); window.location='team.php'</script>"; } include'include/header.php'; ?> <div class="content-wrapper"> <div class="container-fluid"> <!-- Breadcrumbs--> <ol class="breadcrumb"> <li class="breadcrumb-item"> <a href="images.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> <div class="form-group"> <label for="Heading"><b> Contents:</b></label> <textarea name="contents" id="body" class="form-control" cols="30" rows="5"><?php echo $row['contents'];?></textarea> </div> <div class="form-group"> <label for="image"><b> Pdf:</b></label><br> <a href="images/<?php echo $f11 ?>"><?php echo $f11 ?></a> <input type="file" id="image" class="form-control" name="file1"> </div> <button type="submit" name="update" class="btn btn-success">Save</button> </form> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.8.0/ckeditor.js"></script> <script> CKEDITOR.replace('contents'); </script> <?php include'include/footer.php';?>