<?php ###############################     Update User Details Database #########################################
include('dashboard_bdo.php');
require_once('convert_marathi.php');
$id=$_REQUEST['id'];
if (isset($_POST['save']))
	{
		//FETCH DATA
		$loginid=$_POST['logid'];
		//echo $loginid;
		$no1 = $_REQUEST['no'];
		//echo $no1;
		$username=$_POST['usernm'];
		$usertype=$_POST['usertype'];
		$deptid=$_POST['deptid'];
		//echo $deptid;
		$deskid=$_POST['deskid'];
		//echo "".$deskid;
		$mobno=$_POST['mobno'];
		$emailid=$_POST['emailid'];
		//$updeptnm=$_POST['updeptnm'];
		//$desknm=$_POST['desknm'];
		convert_marathi();			
		$qry4=("UPDATE login SET login_id='$loginid', user_name='$username', user_type='$usertype', dept_id='$deptid', desk_id='$deskid', mob_no='$mobno', email_id='$emailid' WHERE id='$id'") or die("".mysql_error());
		$demo = mysql_query($qry4);
		if($demo)
			{
				echo "<script type='text/javascript'>alert('Updated Successfully!')</script>";
				echo '<script language="JavaScript"> window.location.href ="edituser.php" </script>';
					
			}
		else
			{
				echo "<script type='text/javascript'>alert('Updation failed!')</script>";
				echo '<script language="JavaScript"> window.location.href ="edituser.php" </script>';	
			}
	}
?>	