change status vice versa when active then change status in db as inactive
if (isset($_GET['id']) && is_numeric($_GET['id']))
{
$id = $_GET['id'];
$result = mysql_query("UPDATE profile SET status='active' WHERE status='inactive' AND id =$id")
or die(mysql_error());
header("Location: admin-members.php");
}
else{
header("Location: admin-members.php");
}
this is a working code but i wanted it to work both ways. when i click inactive it would change it active and vise versa. i tried it with case too but no luck
?>
maybe you only want to filter it by
$sidand useCASEto toggle the value ofstatus