вот скрипт подскажите где может быть ошибка?
<h3>Пользователи сайта</h3>
<?
if($_POST["likes"]){
$id = intval($_POST["id"]);
$uid = intval($_POST["uid"]);
$name = intval($_POST["name"]);
$lastname = intval($_POST["lastname"]);
$refs = intval($_POST["refs"]);
$likes = intval($_POST["likes"]);
$num = mysql_num_rows(mysql_query("SELECT id FROM tb_members WHERE uid = '".$uid."'"));
if($num>0){
mysql_query("UPDATE tb_members SET id= '$id', name= '$name', lastname= '$lastname', likes = '$likes', ban = '".$_POST["ban"]."' WHERE uid = '".$uid."'");
?>
<div class='w_ok'><div class='wmsg'>Пользователь отредактирован</div></div>
<?
}
}
if($_POST["uid"]){
$id = intval($_POST["id"]);
$uid = intval($_POST["uid"]);
$name = intval($_POST["name"]);
$lastname = intval($_POST["lastname"]);
$refs = intval($_POST["refs"]);
$likes = intval($_POST["likes"]);
$num = mysql_num_rows(mysql_query("SELECT id FROM tb_members WHERE uid = '".$uid."'"));
if($num>0){
$row = mysql_fetch_array(mysql_query("SELECT * FROM tb_members WHERE uid = '".$uid."'"));
?>
<form method="post" action="">
ID: <b><?= $row["id"] ?></b><br>
ID ВК: <b><?= $row["uid"] ?></b><br>
Логин ВК: <b><?= $row["name"] ?> <?= $row["lastname"] ?></b><br>
Лайков: <input type="text" name="likes" value="<?= $row["likes"] ?>"><br>
Рефералов: <input type="text" name="refs" value="<?= $row["refs"] ?>"<br>
Бан: <select name="ban"><option value="0" <? if($row["ban"]==0){?>selected="selected"<? }?>>Не забанен</option><option value="1" <? if($row["ban"]==1){?>selected="selected"<? }?>>Забанен</option></select>
<input type="submit" class="submit_1" value="Сохранить">
</form>
<?
}else{
?>
<?
if ($_GET["option"]=="delete")
{
$id=$_GET["id"];
mysql_query("DELETE FROM tb_members WHERE id='$id'");
echo "<div class='w_ok'><div class='wmsg'>Пользователь удалён.</div></div>";
}
}?>
<br>
<table class="tftable" border="1"><tbody>
<tr class="tab">
<th>ID</th>
<th>ID ВК</th>
<th>Логин ВК</th>
<th>Лайков</th>
<th>Рефералов</th>
<th></th>
<th></th>
</tr>
<?
$sql="SELECT * FROM tb_members order by id desc";
$tabla = mysql_query($sql);
while ($row = mysql_fetch_array($tabla))
{
?>
<tr>
<td><?=$row["id"] ?></td>
<td><?=$row["uid"] ?></td>
<td><?=$row["name"] ?> <?=$row["lastname"] ?></td>
<td><?=$row["likes"] ?></td>
<td><?=$row["refs"] ?></td>
<td>
<form method="post" action="index.php?page=vadminka&s=allusers&id=<?= $row["id"] ?>&option=edit">
<input type="submit" class="submit_1" value="Редактировать" class="button">
</form>
</td>
<td>
<form method="post" action="index.php?page=vadminka&s=allusers&id=<?= $row["id"] ?>&option=delete">
<input type="submit" class="submit_1" value="Удалить" class="button">
</form>
</td>
</tr>
<?
}
?></tbody>
</table>