member control through admin account using php
<p>I am new to php.
I made a member registration on login page and adm too. So inside admin I wanted to get the list of the members and delete the members I dont want. So I took the a code from a sample code for phone book from <a href="http://localhost/xamp" rel="nofollow">http://localhost/xamp</a>  and editted it to my requirement I am able to retrieve the members but unable to delete the members. See the code below:</p>

<p>

<pre><code>require_once('../config.php');

//Array to store validation errors
$errmsg_arr = array();

//Validation error flag
$errflag = false;

//Connect to mysql server
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
 die('Failed to connect to server: ' . mysql_error());
}

//Select database
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
 die("Unable to select database");
}
</code></pre>

<p>?>

    
     
     
     
    </p>

<pre><code>&lt;body&gt;
 &amp;nbsp;&lt;p&gt;

 &lt;h2&gt;&lt;?php echo "User list"; ?&gt;&lt;/h2&gt;

 &lt;table border="0" cellpadding="0" cellspacing="0"&gt;
  &lt;tr bgcolor="#f87820"&gt;
   &lt;td&gt;&lt;img src="img/blank.gif" alt="" width="10" height="25"&gt;&lt;/td&gt;
   &lt;td class="tabhead"&gt;&lt;img src="img/blank.gif" alt="" width="150" height="6"&gt;&lt;br&gt;&lt;b&gt;&lt;?php echo $TEXT['phonebook-attrib1']; ?&gt;&lt;/b&gt;&lt;/td&gt;
   &lt;td class="tabhead"&gt;&lt;img src="img/blank.gif" alt="" width="150" height="6"&gt;&lt;br&gt;&lt;b&gt;&lt;?php echo $TEXT['phonebook-attrib2']; ?&gt;&lt;/b&gt;&lt;/td&gt;
   &lt;td class="tabhead"&gt;&lt;img src="img/blank.gif" alt="" width="150" height="6"&gt;&lt;br&gt;&lt;b&gt;&lt;?php echo $TEXT['phonebook-attrib3']; ?&gt;&lt;/b&gt;&lt;/td&gt;
   &lt;td class="tabhead"&gt;&lt;img src="img/blank.gif" alt="" width="50" height="6"&gt;&lt;br&gt;&lt;b&gt;&lt;?php echo $TEXT['phonebook-attrib4']; ?&gt;&lt;/b&gt;&lt;/td&gt;
   &lt;td&gt;&lt;img src="img/blank.gif" alt="" width="10" height="25"&gt;&lt;/td&gt;
  &lt;/tr&gt;

  &lt;?php
   $firstname=$_REQUEST['firstname'];
   $lastname=$_REQUEST['lastname'];
   $phone=$_REQUEST['phone'];


   if($_REQUEST['action']=="del")
   {
     $result=mysql_query("DELETE FROM members WHERE member_id={$_REQUEST['member_id']}");
   }

   $result=mysql_query("SELECT member_id,firstname,lastname,login FROM members ORDER BY lastname");
   $i = 0;
   while($row = mysql_fetch_array($result)) {
    if ($i &gt; 0) {
     echo "&lt;tr valign='bottom'&gt;";
     echo "&lt;td bgcolor='#ffffff' height='1' style='background-image:url(img/strichel.gif)' colspan='6'&gt;&lt;/td&gt;";
     echo "&lt;/tr&gt;";
    }
    echo "&lt;tr valign='middle'&gt;";
    echo "&lt;td class='tabval'&gt;&lt;img src='img/blank.gif' alt='' width='10' height='20'&gt;&lt;/td&gt;";
    echo "&lt;td class='tabval'&gt;&lt;b&gt;".$row['lastname']."&lt;/b&gt;&lt;/td&gt;";
    echo "&lt;td class='tabval'&gt;".$row['firstname']."&amp;nbsp;&lt;/td&gt;";
    echo "&lt;td class='tabval'&gt;".$row['member_id']."&amp;nbsp;&lt;/td&gt;";

    echo "&lt;td class='tabval'&gt;&lt;a onclick=\"return confirm('".$TEXT['userlist-sure']."');\" href='userlist.php?action=del&amp;amp;member_1d=".$row['member_id']."'&gt;&lt;span class='red'&gt;[".$TEXT['userlist-button1']."]&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;";
    echo "&lt;td class='tabval'&gt;&lt;/td&gt;";
    echo "&lt;/tr&gt;";
    $i++;
   }

   echo "&lt;tr valign='bottom'&gt;";
   echo "&lt;td bgcolor='#fb7922' colspan='6'&gt;&lt;img src='img/blank.gif' alt='' width='1' height='8'&gt;&lt;/td&gt;";
   echo "&lt;/tr&gt;";


  ?&gt;

 &lt;/table&gt;


&lt;/body&gt;
</code></pre>

<p></p>

<p>I haven't editted it that properly and the looks in all.</p>

<p>Please help me in making it able to delete the members also.</p>

<p>I didn't understand what .$TEXT['userlist-button1'].,'".$TEXT['userlist-sure']. variables are?
I also want to include an approved and disapproved radio button in table for each members.</p>

<p>How can I do that?</p>

<p>Please if you can help me.</p>
