ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/home/keydecors/www/ca/admin/app/controller/
Upload File :
Current File : //proc/self/root/proc/self/root/home/keydecors/www/ca/admin/app/controller/menu_update_back.php

<?php
//include database configuration file
include("../model/dboperation.php");
$ids					=   mysqli_real_escape_string($mysqli, $_POST['ids']); 
$food_name		    = 	mysqli_real_escape_string($mysqli , $_POST['name']);
$foodtype		    = 	mysqli_real_escape_string($mysqli , $_POST['foodtype']);
$price		 	    = 	mysqli_real_escape_string($mysqli , $_POST['price']);

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 menu_details SET
food_typs	    =	  '$foodtype',
food_name       =     '$food_name',
price           =     '$price',
food_image	    =     '$img1' WHERE ids='$ids'";    	   
   }
   else
   {
$sql		    =	"UPDATE menu_details SET
food_typs	    =	  '$foodtype',
food_name       =     '$food_name',
price           =     '$price'	WHERE ids='$ids'"; 
	
	} 
   if (!mysqli_query($mysqli,$sql)) {
  die('Error: ' . mysqli_error($mysqli));
}
 
   
   
   header("location:../select_menu.php?pro=$ids");
 ?>

Zerion Mini Shell 1.0