<?php 
 echo @$_GET['msg'];
  session_start();
  if(isset($_SESSION['userId'])){ 
if($_SESSION['userId']==2532){

if(isset($_POST['userid'])){
extract($_POST);
if($usrname==''){
	// echo "Please Enter User Name";
	if($newpas==''){

echo "Please Enter Valid User Detail....";
}
else{

	 require 'connection.php'; 
	   //  
    $purqry = "UPDATE `userreg` SET userpass='$newpas' where userid=$userid";
		$purrun = mysqli_query($connect, $purqry) or die(mysqli_error($connect));
echo "Account Updated....";
	}

}
	else
	{
	$usrname=strtoupper($usrname);

 require 'connection.php'; 
  //  
    $purqry = "UPDATE `userreg` SET username='$usrname', userpass='$newpas' where userid=$userid";
		$purrun = mysqli_query($connect, $purqry) or die(mysqli_error($connect));
echo "Account Updated....";
   }


}

}
}




?>
