I need someone to help me out Urgently please, i will pay 2-3 bucks since its lil fix

Discussion in 'Programming' started by sikhrule, Mar 20, 2010.

  1. #1
    hi

    I have a site, but for some reason, my site members gets logged out after 1-2 minutes, there is some glitch in my php coding file of member login.

    I dont know what exactly to edit, to order to increase the timing limit, or take it out completely.

    Please help me, its a small fixture.

    thanks

    This is the code.


    $showclose=1;
    $res=array();
    if($action=='login')
    {
    if( $_SESSION[wait_end_login] >time() )
    {

    $status=0;
    $msg[]='You exceded the maximum login attempt of ' .$mconfig[fail_login_max] . "<br/>Please wait for " . date("i.s", $_SESSION[wait_end_login]-time()) . " minute(s)." ;
    $_SESSION[fail_attempt_login]=0;
    }
    else
    {
    if( $user_name=="")
    {
    $msg[]="Please enter a valid username" ;
    }

    if( $user_pass=="")
    {
    $msg[]="Please enter password" ;
    }
    }

    if(count($msg)==0)
    {
    $dt=getUserByName($user_name);
    $correct=$dt[user_name]==$user_name && $dt[user_pass]==md5($user_pass);
     
    Last edited: Mar 20, 2010
    sikhrule, Mar 20, 2010 IP
  2. guardian999

    guardian999 Well-Known Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #2
    you should the session
    function islogin(){

    if($_SESSION[wait_end_login]){
    return true;
    }

    }
    }
     
    guardian999, Mar 20, 2010 IP
  3. sikhrule

    sikhrule Peon

    Messages:
    900
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I tried that, still did not fix the problem, by using your code, it just stops loggin people in.

    thanks though, anyone else?
     
    sikhrule, Mar 21, 2010 IP