<?php 
session_start();
include('../includes/dbcon.php');

$str=" ";
$email_edit=" ";




$userid= mysqli_real_escape_string($con,trim($_POST['userid_edit']));
$username= mysqli_real_escape_string($con,trim($_POST['username_edit']));
$emp_id= mysqli_real_escape_string($con,trim($_POST['item_type_edit']));
$roll_edit = mysqli_real_escape_string($con,trim($_POST['roll_edit']));



if (empty($username)) {
    
    echo "<script type='text/javascript'>alert('Please Enter user Name!');</script>";
	echo "<script>document.location='usermgt_user.php'</script>"; 
}

else {

$ss="update employee_master set emp_name = '$empname',Address1='$address',mobile='$telephone' ,email='$email',e_id='$emptype'
	  where emp_id=$emp_id  ";
	  
//username,password,Active,al,edate,emp_id
if ( mysqli_query($con,"update users_master set username = '$username',al=$roll_edit,emp_id=$emp_id 
	  where userid=$userid ")or die(mysqli_error($con)))
		{
			echo "<script>document.location='usermgt_user.php'</script>"; 
		}		

}

?>