ok

Mini Shell

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

 <?php
//include database configuration file
include("../model/dboperation.php");
$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']);
$nationality         = 	mysqli_real_escape_string($mysqli , $_POST['nationality']);
 $img1='';


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

$sql		 =   "INSERT INTO members(mem_name
                                   ,dan
								   ,year
								   ,style
								   ,nationality
								   ,img)
                 VALUES	('$member_name'
				        ,'$dan'
						,'$year'
						,'$style'
						,'$nationality'
						,'$img1')";	
if (!mysqli_query($mysqli,$sql)) {
  die('Error: ' . mysqli_error($mysqli));
}

header("location:../pages/member_add.php");
?>

Zerion Mini Shell 1.0