Hye again. i was required to implement a block user feature at admin level.

hereby i attach the php code for my admin.

Code:
<?php require_once('../Connections/CONN.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
}

// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
	
  $logoutGoTo = "login_admin.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 

  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "login_admin.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?><?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_CONN, $CONN);
$query_UserListing = "SELECT * FROM `user` ORDER BY id ASC";
$UserListing = mysql_query($query_UserListing, $CONN) or die(mysql_error());
$row_UserListing = mysql_fetch_assoc($UserListing);
$totalRows_UserListing = mysql_num_rows($UserListing);
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>


<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>View Users</title>

<link rel="stylesheet" type="text/css" media="all" href="css/admin_console.css">
<link href="css/layout.css" rel="stylesheet" type="text/css" media="screen">



</head><body>


<div id="masthead">
	<table style="width: 100%;" border="0" cellpadding="0" cellspacing="0">
		<tbody><tr>
		<td>
			<h1>
				Personalized Online Phonebook System -- <font color="green">Welcome admin</font>
			</h1>
		</td>
		</tr>
	</tbody></table>
</div>    

<div id="navlist">
		<ul id="navlist">
			
			<li><a href="admin_user.php" title="administrators">Users</a></li>	
            <li><a href="admin_password.php" title="administrators">Change Admin Password</a></li>	
			<li><a href="<?php echo $logoutAction ?>">Logout ()</a></li>
			
		</ul>
</div>
<br clear="all">
<div id="content">
<style>
   /* NOTE: These are example styles to use. You can modift the styles as you
    * NOTE: ...please and intergrate into your entire site.
    */

   .tbl_headercell tbody .tbl_headercell_dataRollOver{
      /* Rollover style on mouse over (Data) */
      background-color:#FFF;
      /* No mouseover color in this example - specify another color if you want this */

   }

   .tbl{
      font-family:arial;
      font-size:12px;
      /* width:400px; */
      empty-cells: show;
   }

   .tbl td{
      margin:0px;
      padding:2px;
      empty-cells: show;
      border-bottom:1px solid #EAE9E1; /* Border bottom of table data cells */
      border-right:1px solid #EAE9E1;  /* Border bottom of table data cells */
      max-height:10px;

   }
   .tbl tbody{
      background-color:#FFF;
   }

   .tbl_headercell{
      /* Standard column header */
      border-top:2px solid #ECE9D8;
   }

   .tbl thead{
      /*position:relative; */ ;
   }
   .tbl thead tr{
      /*position:relative; */
      top:0px;
      bottom:0px;
   }

   .tbl .scrollingContent{
      overflow:auto;
      overflow-y:auto;                    /* NOTE: Remove for no scrolling */
      overflow:-moz-scrollbars-vertical;  /* NOTE: Remove for no scrolling */
      width:100%;
      /* NOTE: Specify a required height for the scrollable table or remove for no scrolling */
      height:350px;

   }


   /* End layout CSS */

</style>
<script language="JavaScript">
        <!--//        
        function checkUncheck(n,b){
            var c = document.getElementsByName(n);
            for(var i=0;i<c.length;i++) {
                c[i].checked=b;
            }
        } 
        //-->
        </script>
<!-- start: content container -->

<div id="contentcontainer">


<h2>Browsing Users</h2>
<table border="0" cellpadding="0" cellspacing="1" width="100%">
<tbody><tr>
   <td align="left"></td>
   <td align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   </td>
</tr></tbody></table>

<form method="post" name="usergrid" id="usergrid">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<thead>
<tr>
	<th colspan="2" class="tbl_headercell" align="right">Action</th>	
	<th class="tbl_headercell" valign="middle">UserID</th>
	<th class="tbl_headercell" valign="middle">Name</th>
	<th class="tbl_headercell" valign="middle">Profile</th>
	<th class="tbl_headercell" valign="middle">Username</th>
	<th class="tbl_headercell" valign="middle">Password</th>
	
</tr>
</thead>
<tbody class="scrollingContent">
<tr bgcolor="#eeeeee"><td colspan="7">&nbsp;</td></tr>
<?
        $counter = 1 ;
		do {
		
			$i++;
            if (($i%2)==0) { $bgColor = "#FFFFFF"; } else { $bgColor = "#C0C0C0"; }
		
      ?>
            <tr bgcolor="<?= $bgColor; ?>">
		<td align="center" valign="top">&nbsp;</td>
		<td align="left" nowrap="nowrap" valign="top">
		
		<a href="edit_user.php?id=<?= $row_UserListing['id'] ?>">Edit</a>&nbsp;&nbsp;&nbsp;<br/>
		<a href="user_delete_process.php?id=<?= $row_UserListing['id'] ?>">Delete</a>
		</td>
		<td nowrap="nowrap" valign="top"><?= $row_UserListing['id'] ?></td>
		<td nowrap="nowrap" valign="top"><?= $row_UserListing['name'] ?></td>
		<td nowrap="nowrap" valign="top">
		
		<strong>Address : </strong>No <?= $row_UserListing['add_no'] ?> , <?= $row_UserListing['street_address'] ?> <br/>
		<strong>Phone : </strong><?= $row_UserListing['phone'] ?> <br/>
		<strong>IC : </strong><?= $row_UserListing['ic'] ?> <br/>
		<strong>Age : </strong><?= $row_UserListing['age'] ?> <br/>
		<strong>DOB : </strong><?= $row_UserListing['dob_day'] ?> / <?= $row_UserListing['dob_month'] ?> / <?= $row_UserListing['dob_year'] ?> <br/>
		
		
		</td>
		<td nowrap="nowrap" valign="top"><?= $row_UserListing['username'] ?></td>
		<td nowrap="nowrap" valign="top"><?= $row_UserListing['password'] ?></td>
		
		
	  </tr>
      
             <? $counter++; } while($row_UserListing = mysql_fetch_array($UserListing)) ?>
    </tbody>
  </table>
  </form>
</div>

</div>
</body></html>
<?php
mysql_free_result($UserListing);
?>
i appreciate if someone could guide me through implementing this new 'block user' feature.

thanx in advance.