Forum Moderators: coopster
<?PHP echo '<a href=refsearch.php?rid='.$row['rid'].'ban=1>Ban</a>'; ?>
<?PHP echo '<a href=refsearch.php?rid='.$row['rid'].'ban=0>UnBan</a>'; ?>
Here is my statement:
$banned=$_GET['rid'];
$ban=$_GET['ban'];
if (!empty($banned)) {
$update = "UPDATE referrals set banned='$ban' WHERE rid='$banned'";
$result = mysql_query($update) or die(mysql_error());
The only part that seems to be working at this point is setting the banned status to 0, once set to 0 I click on "ban" to set it back to 1 and it's not working, it says it is based on my echo but it's not updating it to 1 in the db.
$banned = (int)$_GET['rid'];
$ban = (int)$_GET['ban'];
>> is it a typo or did you miss a & or ; in
Nice catch :)