Server IP : 108.170.25.35 / Your IP : 3.137.176.238 Web Server : Apache/2 System : Linux gains.winzonesoftech.com 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64 User : studio ( 1434) PHP Version : 8.1.28 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/studio/public_html/gfgdfgdfg/ |
Upload File : |
<?php include'header.php';?> <?php include'sidebar.php';?> <?php include 'conn.php';?> <script> function show_confirm() { return confirm("Are You Sure delete"); } </script> <?php if(isset($_POST['submit'])) { $image="img/".$_FILES['image']['name']; move_uploaded_file($_FILES['image']['tmp_name'],$image); $sql =mysqli_query($conn,"INSERT INTO recent_work(image) VALUES ('$image')"); if($sql){ echo "<script> alert ('data stored successfully')</script>"; echo "<script> window.location.assign ('recent_work.php')</script>"; } else{ echo "ERROR: Hush! Sorry "; } } ?> <!--********************************** Content body start ***********************************--> <div class="content-body recent-imgheight"> <div class="container-fluid"> <div class="row page-titles mx-0"> <div class="col-sm-6 p-md-0"> <div class="welcome-text"> <h4>Studio 7 Eleven Recent Work</h4> <br> <h5 class="ml-1">Images</h5> </div> </div> </div> <!-- row --> <div class="row"> <div class="col-xl-6 col-xxl-12"> <div class="card"> <div class="card-header"> <h4 class="card-title">Image Upload</h4> </div> <div class="card-body"> <div class="basic-form custom_file_input"> <form action="" method="POST" enctype="multipart/form-data"> <div class="form-group"> <div class="custom-file"> <input type="file" name="image" class="custom-file-input"> <label class="custom-file-label">Choose file</label> </div> <br> <br> <div class="col-12"> <button type="submit" name="submit"class="btn btn-primary mb-2">Submit</button> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> <!--********************************** Content body end ***********************************--> <!--********************************** Content body start ***********************************--> <div class="content-body"> <div class="container-fluid"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <h4 class="card-title">Recent Work Datatable</h4> </div> <div class="card-body"> <div class="table-responsive"> <table id="example" class="display" style="min-width: 845px"> <thead> <tr> <th>S.NO</th> <th>Image</th> <th>Delete</th> <th>Edit</th> </tr> </thead> <tbody> <?php $x=1; $display=mysqli_query($conn,"SELECT * From recent_work"); while ($row=mysqli_fetch_array($display)) { ?> <tr> <td><?php echo $x;?></td> <td><img height="50px" class="annual"src="<?php echo $row['image'];?>" alt="image"></td> <td><a href="recentdel.php?id=<?php echo $row['id'];?>"><img class="del-img"src="images/delete.png" alt="image"></a></td> <td><a href="workedit.php?id=<?php echo $row['id'];?>"><img class="del-img"src="images/edit.png" alt="image"></a></td> </tr> <?php $x++; } ?> </tbody> <tfoot> <tr> <th>S.NO</th> <th>Image</th> <th>Delete</th> <th>Edit</th> </tr> </tfoot> </table> </div> </div> </div> </div> </div> </div> </div> <!--********************************** Content body end ***********************************--> <?php include'footer.php';?>