Location: PHPKode > projects > PHP Enter > www/admin/user_search.php
<?php include('header.php'); include('options.php'); ?>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="8" bgcolor="#FFFFFF">
 <tr>
  <td><strong>Members</strong>
  </td>
 <tr>
 <tr>
  <td width="450px">
<?php
if(isset($_POST['submit']))
  {
$document = $_POST['document'];
$resultya = mysql_query("SELECT * FROM users WHERE username like '%$document%'")
or die(mysql_error()); 
while($myrow = mysql_fetch_assoc($resultya))
{
?>
<b>Username: <?php echo $myrow['username'] ?></b><br />
Email: <?php echo $myrow['email'] ?><br />
Active: <?php echo $myrow['active'] ?> | 

<?php
if($myrow['active'] == 2){

?>
<a href="activate_user.php?id=<?php echo $myrow['usid'] ?>">Activate (email not confirmed)</a><br />

<?php
}else{
echo "<font color=\"green\">Active. Email-confirmed user</font>";
}
?>

Level: <?php echo $myrow['privilege'] ?><br />
<a href="deluser.php?id=<?php echo $myrow['usid'] ?>"><font color="red">Delete User <?php $myrow['username'] ?></font></a><br /><br />
<?php
}
}else{ 
?>
<font color=#3A586A size=1>Username</font><br />
<form name="myforma" action="user_search.php" method="post">
<input type="text" value="" name="document"><br /><br />
<input type="submit" name="submit" value="ok">
</form></div>
<?php
}
?>
  </td>
 </tr>
</table>
Return current item: PHP Enter