modified view_user.php , broken the functionality into multiple functions