Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End User System – Driving me mad!

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26250

    Okay, so I’m building this user management system for a client and up until a few day ago it was working perfectly. I mush have edited some code or done something because now it just ain’t working! Have been looking through the code for ages now and I just can’t find any errors. Can you?

    There are 3 files: login.php, userauth.php and index.php. Login.php is where the user enters their details to login, these details are then passed to userauth.php and if correct the browser is then redirected to index.php. The problem is this. When I get to the index page the session variables are cleared. I have checked at each stage and the data is present up until the index page. Now if you were wondering there is a base.php, this is just connecting to the database – and no there aren’t any errors or odd code in there, but I’m not too keen on sharing my login details with you as you can imagine!

    login.php:

    Code:





    St Ann’s Church | Login

    Please enter a valid Username and Password!tt“; } ?>





    userauth.php:

    Code:
    “; }
    ?>




    St Ann’s Church | Login

    “; };
    if($row[‘firstLogin’] == 0){ mysql_query(“UPDATE users SET firstLogin='”.$date.”‘ WHERE username='”.$iusername.”‘”); };
    mysql_query(“UPDATE users SET lastLogin='”.$date.”‘ WHERE username='”.$iusername.”‘”);
    mysql_query(“UPDATE users SET online=’1’ WHERE username='”.$iusername.”‘”);
    echo ““;
    }
    else {
    echo ““;
    session_destroy();
    }

    ?>


    index.php:

    Code:
    “; die();*/ echo “N
    DR”; };
    ?>




    St Ann’s Church | CMS

    Welcome to the index !

    Edit the Homepage

    Edit your Information







    I have been pulling my hair out over this and if you can tell me why it isn’t playing ball I would be really grateful.

    Thanks guys.

    -Tom

    #64737
    cybershot
    Participant

    try asking this question over at phpfreaks.com

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.