ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/home/keydecors/public_html/admin/controller/
Upload File :
Current File : //proc/self/root/proc/self/root/home/keydecors/public_html/admin/controller/c_update.php

<?php
//include database configuration file
include("../model/dboperation.php");
$menu		 =	 mysqli_real_escape_string($mysqli, $_POST['pid']); 

$p_name		 = 	 mysqli_real_escape_string($mysqli , $_POST['p_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'],"../pro_img/".$newfilename1);
$img1=$newfilename1;


$sql		  =	"UPDATE prod_name SET
p_name		  =	  '$p_name',
p_img1        =     '$img1' WHERE pro_id='$menu'";    	   
   }
   
   else
   {
   $sql		  =	"UPDATE prod_name SET
p_name		  =	  '$p_name' WHERE pro_id='$menu'"; 
   }
   if (!mysqli_query($mysqli,$sql)) {
  die('Error: ' . mysqli_error($mysqli));
}
      header("location:../pages/category_update.php?pro=$menu");

Zerion Mini Shell 1.0