ok

Mini Shell

Direktori : /home/keydecors/www/ca/admin/app/controller/
Upload File :
Current File : /home/keydecors/www/ca/admin/app/controller/customer_profile_update.php

<?php
//include database configuration file
include("../model/dboperation.php");
$ids					=   mysqli_real_escape_string($mysqli, $_POST['ids']); 
$sp_medicine		    = 	mysqli_real_escape_string($mysqli , $_POST['spmedicine']);
$profile_number		    = 	mysqli_real_escape_string($mysqli , $_POST['profile_number']);
$doctor_name		    = 	mysqli_real_escape_string($mysqli , $_POST['doctor_name']);

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'],"../images/".$newfilename1);
$img1=$newfilename1;


$sql		    =	"UPDATE members SET
mem_name	    =	  '$member_name',
dan              =    '$dan',
year             =   '$year',
style             =   '$style',
nationality      =   '$nationality',
img            =     '$img1'	WHERE ids='$ids'";    	   
   }
   else
   {
$sql		    =	"UPDATE members SET
mem_name	    =	  '$member_name',
dan              =    '$dan',
year             =   '$year',
style             =   '$style',
nationality      =   '$nationality'	WHERE ids='$ids'"; 
	
	} 
   if (!mysqli_query($mysqli,$sql)) {
  die('Error: ' . mysqli_error($mysqli));
}
   header("location:../pages/member_update.php?pro=$ids");
   
   
   header("location:../customer_profile_update.php?pro=$ids");
 ?>

Zerion Mini Shell 1.0