name : add_client.php
<?php 
    
include('../config/config.php');

 $images1 = $_FILES['file']['tmp_name'];
 $images_name1 = $_FILES['file']['name'];
 $images = "images/client/".$images_name1;

 move_uploaded_file($_FILES['file']['tmp_name'],"../images/client/".$_FILES["file"]["name"]);
 $sql = "INSERT INTO clients (cl_image) VALUE ('".$images."')";

 $res = $conn->query($sql);
 if($res === TRUE){
     echo 1;
 }else{
     echo 0;
 }

 ?>

© 2024 UnknownSec