ok

Mini Shell

Direktori : /home/keydecors/public_html/admin/controller/
Upload File :
Current File : /home/keydecors/public_html/admin/controller/slider_update.php

<?php
//include database configuration file
include("../model/dboperation.php");
$ids		 =	 mysqli_real_escape_string($mysqli, $_POST['pid']); 
$member_name		 = 	mysqli_real_escape_string($mysqli , $_POST['member_name']);
$dan		         = 	mysqli_real_escape_string($mysqli , $_POST['dan']);
$year		        = 	mysqli_real_escape_string($mysqli , $_POST['year']);
$style		         = 	mysqli_real_escape_string($mysqli , $_POST['style']);
 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'],"../slider/".$newfilename1);
$img1=$newfilename1;


$sql		    =	"UPDATE members SET
mem_name	    =	  '$member_name',
dan              =    '$dan',
year             =   '$year',
style             =   '$style',
img            =     '$img1'	WHERE ids='$ids'";    	   
   }
   else
   {
	$sql		  =	"UPDATE sliders SET
title		  =	  '$p_name',
details     =    '$p_information' WHERE id='$menu'"; 
	
	} 
   if (!mysqli_query($mysqli,$sql)) {
  die('Error: ' . mysqli_error($mysqli));
}
   header("location:../pages/slider_update.php?pro=$menu");
   
   

Zerion Mini Shell 1.0