Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by splintercell!
    you just need to edit your login forum from what I see to:
    PHP Code:
    <?php

    if ($_POST['username']) {
    $username=$_POST['username'];
    $password=$_POST['password'];

    if (
    $password==NULL) {
    echo 
    "A password was not supplied";
    }else{

    $query mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());

    $data mysql_fetch_array($query);

    if(
    $data['password'] != $password) {
    echo 
    "The supplied login is incorrect";
    }else{

    $query mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error());

    $row mysql_fetch_array($query);

    $_SESSION["rank"] = $row['rank'];
    $_SESSION["username"] = $row['username'];

    header ('Location: members.php?act=menu');
    }
    }
    }
    ?>
    Login:
    <form action='members.php?act=login' method='POST'>
    <table class="middles">
    <tr>
    <td align='left'>
    Username:<br><input type='text' size='15' maxlength='25' name='username'>
    </td>
    </tr>
    <tr>
    <td align='left'>
    Password:<br><input type='password' size='15' maxlength='25' name='password'>
    </td>
    </tr>
    <tr>
    <td align='left'>
    <input type="submit" value="Login">
    </td>
    </tr>
    <tr>
    <td align='left'>
    </td>
    </tr>
    </table>
    </form>
    that will hopefully work
    Nope Normal members can see the admin area aswell
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  2. #12
    Join Date
    Nov 2004
    Posts
    1,221
    Tokens
    0

    Latest Awards:

    Default

    I'm about to embark on making one for The-Pit soon (Dear God!).
    Is it as hard as this thread looks :p!!

  3. #13
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default

    OOOHHHHH!!! kthnxbi

    i fixed it, i did something wrong on the admin area :@ i hadnt changed it from what splint told me it was still a number

    Thanks for help everybody!!!!

    +Rep

    Closed!
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •