ok
Direktori : /proc/self/root/proc/self/root/home/keydecors/public_html/admin/controller/ |
Current File : //proc/self/root/proc/self/root/home/keydecors/public_html/admin/controller/super_update.php |
<?php //include database configuration file include("../model/dboperation.php"); $ids = mysqli_real_escape_string($mysqli, $_POST['ids']); $su_name = mysqli_real_escape_string($mysqli , $_POST['su_name']); $su_details = mysqli_real_escape_string($mysqli , $_POST['su_details']); if(!empty($_FILES['img1']['tmp_name'])) { $temp1 = explode(".",$_FILES["img1"]["name"]); $newfilename1 = rand(). "_".date('m-d-Y_hia') . '.' .end($temp1); move_uploaded_file($_FILES['img1']['tmp_name'],"../super_stockists/".$newfilename1); $img1=$newfilename1; $sql = "UPDATE super_stockists SET su_medicine = '$su_name', su_medicine_details = '$su_details', img = '$img1' WHERE id='$ids'"; } else { $sql = "UPDATE super_stockists SET su_medicine = '$su_name', su_medicine_details = '$su_details' WHERE id='$ids'"; } if (!mysqli_query($mysqli,$sql)) { die('Error: ' . mysqli_error($mysqli)); } header("location:../pages/super_stokist_update.php?pro=$ids");