Ran across an issue I can't figure out.
I am creating an admin page that shows the usernames. By each username there is an edit image allowing the admin to edit the users information. Is there a way that it will not show the edit image in the echoed usernames so that no one can edit the main admins account? I've tried a few different ways, but can't seem to figure it out. Here is the code:
Code: Select all
<?php
$sql = "SELECT * FROM users ORDER BY username ASC";
$user_query = mysqli_query($db_conx, $sql);
$numrows = mysqli_num_rows($user_query);
while ($row = mysqli_fetch_array($user_query, MYSQLI_ASSOC)) {
?>
<table>
<td width="25%"><?php echo $row['ID'];?></td><td width="50%"><?php echo $row['username'];?></td><td width=35%><a href="edit_user.php?id=<?php echo $row['ID'];?>&username=<?php echo $row['username'];?>"><img src="../image/user_edit.png" title="Edit User Account"></a> </td>
Any Ideas? Thx