GetReady Posted July 12, 2010 Share Posted July 12, 2010 Is it possible to make the following function only run once the user types in there password? if so how would i go about it, Regards. function deleteUser($id){ $str = "DELETE FROM `UserDetails` WHERE ID='$id'"; //echo $str; $q = @mysql_query($str); $str = "DELETE FROM `Ranks` WHERE userID='$id'"; $q = @mysql_query($str); deleteUserWeapon($id); deleteIP($id); deleteAtacksOfUser($id); deleteSpyLogsOfUser($id); deleteMessagesOfUser($id); $str = "update `UserDetails` set commander=0 WHERE commander='$id' "; $q = @mysql_query($str); /* if (!$q) { print ('Query failed: '.mysql_error()); return; }*/ Link to comment https://forums.phpfreaks.com/topic/207519-any-clues/ Share on other sites More sharing options...
gwolgamott Posted July 12, 2010 Share Posted July 12, 2010 Yeah do it on the login script with the password verification. Once the password is verified run it there. This is of course taking for granted that you don't recall that same verifications script to see if they are logged in later on... if you do that you'll have to develop a flag so as to not run it more then once. Link to comment https://forums.phpfreaks.com/topic/207519-any-clues/#findComment-1084914 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.