disable login [lavalair script]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kuklux
    replied
    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/>";
    }

    Leave a comment:


  • djdevil89
    replied
    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:


  • mcKeny
    replied
    Originally posted by drwap View Post
    lol or use
    PHP Code:
    $who $uid
    whats tha perpose of assiging $uid as $who????

    Leave a comment:


  • realcoder
    replied
    login page

    thankx bro will do am gonna test it and tell you
    Last edited by realcoder; 15.05.09, 11:48. Reason: mistakes made

    Leave a comment:


  • crazybrumi
    replied
    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:


  • djdevil89
    replied
    lol or use
    PHP Code:
    $who $uid

    Leave a comment:


  • crazybrumi
    replied
    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/>";

    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."'")); 
    this selects the column login in the row where id is = $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."'")); 
    PHP 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 
    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 statements

    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:


  • mcKeny
    replied
    lol lol anyways who is not declare in the login page......................use $uid instead

    Leave a comment:


  • subzero
    replied
    You want it to lock with sql or plan shut down ??

    Leave a comment:


  • realcoder
    replied
    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:


  • metulj
    replied
    Originally posted by realcoder View Post
    why if you dont have anything to say that will help me in getting the code right my advice shut up
    i dont think you will get much help with such behavior....

    Leave a comment:


  • alesh
    replied
    Originally posted by realcoder View Post
    why if you dont have anything to say that will help me in getting the code right my advice shut up
    very nice... i didnt know tht we r not aloved 2 comment.....:eek:

    Leave a comment:


  • capofret
    replied
    Originally posted by realcoder View Post
    why if you dont have anything to say that will help me in getting the code right my advice shut up
    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.
    anyway, u can check other lava script edits for reference with what u are asking.

    Leave a comment:


  • realcoder
    replied
    why if you dont have anything to say that will help me in getting the code right my advice shut up

    Leave a comment:


  • capofret
    replied
    lol i agree, y disable login when u can either close the site or ban the users

    Leave a comment:

Working...
X