sup bois
sorry for spamming threads but I have more errors.
Whenever I click the fa fa-user-times icon, It should update column "is_vip_shop_staff" to 0.
But when I click the icon, it deletes All rows.
Code:
Image:
sorry for spamming threads but I have more errors.
Whenever I click the fa fa-user-times icon, It should update column "is_vip_shop_staff" to 0.
But when I click the icon, it deletes All rows.
Code:
Code:
while($row = mysql_fetch_array($result)){ //Creates a loop to loop through results
$id = $row['id'];
echo "<tr><td>" . ltrim($row['id'], '0') . "</td><td>" . $row['username'] . "</td><td>" . $row['rank'] ."</td> ";
echo "<td><a href='?fire=$id'><i class='fa fa-user-times' aria-hidden='true'title='Fire user'></i></a></td>";
if(isset($_GET['fire'])) {
mysql_query("UPDATE `users` SET `is_vip_shop_staff`='0' WHERE (`id`='$id')");
echo "fired user successfully'";
echo "<meta http-equiv='refresh' content='3;url=usermanagement.php'>";
}
}