Hi,
i'm trying to tell my sql no to delete if the results are 1 and that it has to be at least one user. but i can't:
<!------------------------------------------>
<script language="JavaScript">
function confirmBox(id)
{
if (confirm("Tem a certeza que pretende eliminar este registo?"))
{
location.href="remover_user.php?id="+id;
}
else
{
return false;
}
}
</script>
<!---------------------------------------------->
<!---------------------------------------------->
<script>
function wow()
{
alert("Tem de existir pelo menos um Administrador.");
}
</script>
<!---------------------------------------------->
<td width="5%">
<a href="edit_user.php?id=<?php echo $list_user['id_utilizador']; ?>">Editar</a>
</td>
<?php
if ($row_users!==1)
{
?>
<td width="5%">
<a href="#" onclick="confirmBox('<?php echo $row_users['id_utilizador']; ?>')">Remover</a>
</td>
<?php
;}
else
{
?>
<td width="5%">
<a href="#" onclick="wow()">Remover</a>
</td>
<?php
;}
?>
Can someone help me?
Thank you