<?php 
include('connection/db.php');
require_once('convert_marathi.php');
$no1 = $_REQUEST['no'];
//FETCH DATA
$loginid=$_POST['logid'];
//echo $loginid;
$no1 = $_REQUEST['no'];
$username=$_POST['usernm'];
$usertype=$_POST['upustype'];
$deptid=$_POST['deptid'];
$deskid=$_POST['deskid'];
$mobno=$_POST['mobno'];
$emailid=$_POST['emailid'];
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='$no1'");
$demo = mysql_query($qry4);
if($demo)
{
	echo "OK";
}
else
{
	echo "Failed";
}
if(mysql_query($qry4)) 
{
	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>';		
}
?>	