ok
Direktori : /home/keydecors/www/admin/controller/ |
Current File : /home/keydecors/www/admin/controller/p_name_add.php |
<?php //include database configuration file include("../model/dboperation.php"); $username = mysqli_real_escape_string($mysqli , $_POST['p_name']); $password = mysqli_real_escape_string($mysqli , $_POST['password']); /*$temp1 = explode(".",$_FILES["img1"]["name"]); $allowed = array('gif','png' ,'jpg','jpeg'); if(!in_array(end($temp1),$allowed) ) { $newfilename1 = rand(). "_".date('m-d-Y_hia') . '.' .end($temp1); move_uploaded_file($_FILES['img1']['tmp_name'],"../pro_img/".$newfilename1); $img1=$newfilename1;*/ $sql = "INSERT INTO admin(username ,password) VALUES ('$username' ,'$password')"; if (!mysqli_query($mysqli,$sql)) { die('Error: ' . mysqli_error($mysqli)); } header("location:../pages/user_name_select.php?msg=2"); ?>