Jump to content

Any clues?


GetReady

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.