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/specialty_update.php |
<?php //include database configuration file include("../model/dboperation.php"); $ids = mysqli_real_escape_string($mysqli, $_POST['ids']); $sp_name = mysqli_real_escape_string($mysqli , $_POST['sp_name']); $sp_details = mysqli_real_escape_string($mysqli , $_POST['sp_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'],"../speciality/".$newfilename1); $img1=$newfilename1; $sql = "UPDATE sp_medicine SET sp_medicine = '$sp_name', sp_medicine_details = '$sp_details', img = '$img1' WHERE ids='$ids'"; } else { $sql = "UPDATE sp_medicine SET sp_medicine = '$sp_name', sp_medicine_details = '$sp_details' WHERE ids='$ids'"; } if (!mysqli_query($mysqli,$sql)) { die('Error: ' . mysqli_error($mysqli)); } header("location:../pages/specialty_medicines_update.php?pro=$ids");