Ok, they click on the link to delete the user. Which is generate by
PHP Code:
<a href="users.delete.php?ID='.$data[$i]['id'].'">
Then I get the ID and it deletes the user.
Problem is, I cant set that link outside the SQL function.
So, the link
HTML Code:
<a href="#" onClick="confirm_ex();return false;">
is inside the SQL function.
So it would need to be <a href="users.delete.php?ID='.$data[$i]['id'].'" onClick="confirm_ex();return false;">
Problem is. Is that...
Code:
<script language="JavaScript" type="text/javascript">
<!--
function confirm_ex(){
if (confirm("Are you sure?")){
return;
}
}
// -->
</script>
... returns false, so even if they click yes, it stops, because it returns false.
And if I use "return true;" it returns true, and deletes the user even if they click no/cancel.
So for it to continue, It would need to return true. And return false = stop.
I hope thats indepth anough.
Thanks,
Lothop
__________________
Websites Created;
warscope.com
ratepayers.org.nz
|