ok
Direktori : /proc/self/root/proc/self/root/home/keydecors/www/ca/admin/app/controller/ |
Current File : //proc/self/root/proc/self/root/home/keydecors/www/ca/admin/app/controller/testimonial_back.php |
<?php //include database configuration file include("../model/dboperation.php"); $name = mysqli_real_escape_string($mysqli , $_POST['name']); $job = mysqli_real_escape_string($mysqli , $_POST['job']); $testimonial = mysqli_real_escape_string($mysqli , $_POST['testimonial']); if(!empty($_FILES["img"]['tmp_name'])){ $temp1 = explode(".",$_FILES["img"]["name"]); $newfilename1 = rand(). "_".date('m-d-Y_hia') . '.' .end($temp1); move_uploaded_file($_FILES['img']['tmp_name'],"../testimonial/".$newfilename1); $img=$newfilename1; } $sql = "INSERT INTO testimonial(name ,job ,testimonial ,img) VALUES ('$name' ,'$job' ,'$testimonial' ,'$img')"; if (!mysqli_query($mysqli,$sql)) { die('Error: ' . mysqli_error($mysqli)); } header("location:../testimonial.php"); ?>