<? 
 if($_SESSION['page'] == '3' and $_SESSION['section'] == '1') 
 	{ 
			if ($_GET['stat'] == 'update' )
				{
						
						$id					=$_POST['id'];
						$active				=$_POST['active'];
						$account_type		=$_POST['account_type'];
						$username			=strtoupper($_POST['username']);
						$fname				=$_POST['fname'];
						$lname				=$_POST['lname'];
						$email				=$_POST['email'];
						$phone				=$_POST['phone'];
						$address1			=$_POST['address1'];
						$address2			=$_POST['address2'];
						$city				=$_POST['city'];
						$country			=$_POST['country'];
						
					if ($_POST['password'] == "" ) 
						{
							mysql_query("UPDATE ".$dcm_table_start."userlist SET active = $active , account_type = '$account_type' , username = '$username' , fname = '$fname' , lname = '$lname',email = '$email' ,phone = '$phone',address1 = '$address1' ,address2 = '$address2' , city = '$city' , country = '$country' where  user_id = '$id'");
						}else{
						
							$password 			=md5($_POST['password']);
							mysql_query("UPDATE ".$dcm_table_start."userlist SET active = $active , account_type = '$account_type' , username = '$username' , fname = '$fname' , lname = '$lname',email = '$email' ,phone = '$phone',address1 = '$address1' ,address2 = '$address2' , city = '$city' , country = '$country' , password = '$password' where  user_id = '$id'");
						}	
						header("Location: index.php"); 
				}
	}
?>