i think it should be like this to work.
$login = mysql_fetch_array(mysql_query("SELECT name, login FROM ibwf_users WHERE name='".$loginname."'"));
if($login==1)
{
//this is were i put the site login link//
}else if($login[1]=='2'){
echo "$uid your login has been disabled by a staff member<br/>";
echo "if this is a error contact a admin/owner<br/>";
}
disable login [lavalair script]
Collapse
X
-
lol if he uses the $who more then once in the same script where it should be $uid its easier to use the statement i gave instead of changing all parts
Leave a comment:
-
but why, theres no point of assigning it if it dosnt need to. thats just silly, and can take alot of space if its a big script. think about it
Leave a comment:
-
do you know what you have told it to do here?PHP Code:$login = mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$who."'"));
if($login==1)
{
//this is were i put the site login link//
}else if($login[0]=='2'){
echo "$uid your login has been disabled by a staff member<br/>";
echo "if this is a error contact a admin/owner<br/>";
}
this selects the column login in the row where id is = $WhoPHP Code:$login = mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$who."'"));
this is incorrect because u want to find the id of the person who logged in there for it should be set as $uid
so the above should be changed to
PHP Code:$login = mysql_fetch_array(mysql_query("SELECT login FROM ibwf_users WHERE id='".$uid."'"));
ther is no need for if($login[0]=='2') cos it can only be something else. you would only need to use this if there was more than 3 statementsPHP Code:if($login[0]=='0') // if statements begins, if user has 1 in the column of the selected row for that member
{ // then output this following
echo "Please click this link for example in your case";
}else // otherwise if it dostnt have 0 in the column display this
{
echo "$uid your login has been disabled by a staff member<br/>";
echo "if this is a error contact a admin/owner<br/>";
} //end if statement
make 0 default in databse and make 1 = ban that way you can clearly see whats hapnin 1 and 2 dont really mean anything. 0,1 most people can relate to as 0 and 1 is used in binary etc.Last edited by crazybrumi; 13.05.09, 15:50.
Leave a comment:
-
lol lol anyways who is not declare in the login page......................use $uid instead
Leave a comment:
-
disable login
i need to know what am doing wrong can someone who actually knows how to code help me plz :p
Leave a comment:
-
well, this is a forum if you forgot and were just saying that your idea can be done in other ways like banning or just closing the site. and from your username, you should get the code for it.Originally posted by realcoder View Postwhy if you dont have anything to say that will help me in getting the code right my advice shut up
anyway, u can check other lava script edits for reference with what u are asking.
Leave a comment:
-
why if you dont have anything to say that will help me in getting the code right my advice shut up
Leave a comment:
-
lol i agree, y disable login when u can either close the site or ban the users
Leave a comment:
Leave a comment: