Uname : Linux V-ShopU01 4.18.0-348.20.1.el8_5.x86_64 #1 SMP Thu Mar 10 20:59:28 UTC 2022 x86_64
Server : Apache/2.4.37 (rocky) OpenSSL/1.1.1k
Whoami : apache
Safe Mode : OFF
DOCUMENT ROOT : /var/www/html/site_shopudiet
Disable Function :
Path : /var/www/html/site_shopudiet/admin/

Server IP : 65.20.74.164 Client IP : 3.138.34.31
Current File : /var/www/html/site_shopudiet/admin/add_notification.php
 <?php
         
            include 'dbconnect.php';
            
                $title=$_POST['title'];
                $description=$_POST['description'];
                $url =$_POST['url'];
                $date = $_POST['end_date'];
                $product_id = $_POST['product'];
                if(basename($_FILES["file"]["name"])) $uniquesavename=time().uniqid(rand()); else $uniquesavename='';
                  $file_name1 = $uniquesavename;
                  $target_file =  "img/".$uniquesavename;
                  move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
                $sql="INSERT INTO notification(title,description,url,end_date,image,product_id) VALUES('$title','$description','$url','$date','$file_name1','$product_id')";
               if ($conn->query($sql) === TRUE)
                 {
                      echo "<script> alert('Successfull'); window.location.href='notification_list.php'; </script>";
        
                } 
               else 
                 {
                   echo "Error: " . $sql . "<br>" . $conn->error;
                 }
                
                	mysqli_close($conn);
         ?>