ok
Direktori : /proc/self/root/home/keydecors/www/ca/admin/app/controller/ |
Current File : //proc/self/root/home/keydecors/www/ca/admin/app/controller/header_upback.php |
<?php //include database configuration file include("../model/dboperation.php"); $ids = mysqli_real_escape_string($mysqli, $_POST['ids']); $phone = mysqli_real_escape_string($mysqli , $_POST['phone']); 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'],"../logo/".$newfilename1); $img=$newfilename1; $sql = "UPDATE head_section SET phone = '$phone', logo = '$img' WHERE ids='$ids'"; } else { $sql = "UPDATE head_section SET phone = '$phone' WHERE ids='$ids'"; } if (!mysqli_query($mysqli,$sql)) { die('Error: ' . mysqli_error($mysqli)); } header("location:../header_section.php?pro=12"); ?>