I am trying to make a deactivate account so ...When I click a link I want the account status to be updated in the database so it will turn 0. Every time I click the link here nothings happens it just re direct me to another page this my code for the deactivating
<?php
include "../includes/dbcon.php";
if(isset($_GET['user_id']))
{
$result = mysql_query("SELECT user_id FROM users WHERE user_id = $user_id");
while($row = mysql_fetch_array($result))
{
echo $result;
$status = $row($_GET['status']);
if($status == 1)
{
$status = 0;
$update = mysql_query("Update users set status = $status");
header("location: admin_manage_account.php");
}
else
{
echo "Already deactivated";
}
}
}
?>