Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: 1,000 points! Help me get a login system working

  1. #1
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    1,000 points! Help me get a login system working

    OK So here's my problem. I'm working on my KleenAS CMS and I can't seem to get the login system to work. I'd like to use cookies or sessions, whichever is easier, but it needs to work with the current PHP version (5.2.0) and I've already got the MySQL table set up for users with password encryption.

    So here's what I need:

    Login Script: Simple enough for me to configure and understand
    Security: Using sessions or cookies, checking entered md5ed password with md5ed password in the DB
    Communication: We will communicate through AIM or MSN (preferred)
    Other Info: If you'd like to help me with this, I need you to stay through with me for this until the end when it is working and I am acceptant of your work. So once all of this is completed, and I decide that your work is proficient enough for reward, you will then receive your 1,000 points.

    Post here if you have any questions.
    Last edited by Chris Z; 02-27-2007 at 07:27 AM.
    -Chris Z
    Retired Account Manager


  2. #2
    swirly's Avatar
    swirly is offline x10 Elder swirly is an unknown quantity at this point
    Join Date
    Jul 2005
    Location
    NC
    Posts
    965

    Re: 1,000 points! Help me get a login system working

    I've found a script that I am using that I could give you a link to....Bryon showed it to me so i know its good. lol
    Don't go to bed angry, stay awake and plot revenge.

  3. #3
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: 1,000 points! Help me get a login system working

    Well i won't give you 1,000 points if you didn't make it yourself, but if you show it to me and I use it, I'll probably at least give you 100
    -Chris Z
    Retired Account Manager


  4. #4
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: 1,000 points! Help me get a login system working

    Quote Originally Posted by Chris Z View Post
    current PHP version (5.2.0)
    IN actuality's terms, the 'current' PHP version is '5.2.1'. '5.2.0' is outdated with over 60 major security flaws fixed from '5.2.0' to '5.2.1', not including the minor ones, which could be in the thousands.

    PHP Code:
    <?php
    /*
     _____   _____   _____   _____    _   _____   _____   _   __   _   _____  
    |  _  \ /  ___/ /  ___| |  _  \  | | |  _  \ |_   _| | | |  \ | | /  ___| 
    | |_| | | |___  | |     | |_| |  | | | |_| |   | |   | | |   \| | | |     
    |  _  { \___  \ | |     |  _  /  | | |  ___/   | |   | | | |\   | | |  _  
    | |_| |  ___| | | |___  | | \ \  | | | |       | |   | | | | \  | | |_| | 
    |_____/ /_____/ \_____| |_|  \_\ |_| |_|       |_|   |_| |_|  \_| \_____/ 

    (c)2007 BScripting Inc. All RIghts Reserved.

    No data from this script may be used in other scripts without permisson from the create, Brandon Long

    Created by Brandon Long <brandon@blnetworks.net>, President and Lead Developer of BScripting
    */

    // Start the session
    session_start();

    // Include your config file
    include '';

    if (isset(
    $_POST['submit'])) {

        if (
    $_POST['username'] != '') {

            if (
    $_POST['password'] != '') {

                
    $username $_POST['username'];
                
    $password md5($_POST['password']);

                
    $getdata mysql_query("SELECT * from `users` WHERE `username`='$username' LIMIT 0,1");
                
    $QueryDB3 mysql_fetch_array($getdata);

                    if (
    $QueryDB3['password'] == $password) {

                        
    // The user has loggedin:-)

                        
    $_SESSION['username'] = $username;
                        
    $_SESSION['password'] = $password;

                        
    header("Location: "); // Enter red URL here

                    
    }else{ header("Location: login.php?error=1"); } // Wrong Password

            
    }else{ header("Location: login.php?error=2"); } // Never entered password

        
    }else{ header("Location: login.php?error=3"); } // Never entered username

    }else{  // Never subbmitted the form

    // LOGIN SCRIPT HERE.

    /*
    Please put the login script here. Include the following snipplet at the bottom
    */

    /*

    if (isset($_GET['error'])) {

        if ($_GET['error'] == 1) { echo '<font color="red">Incorrect Password</font>'; }
        elseif ($_GET['error'] == 2) { echo '<font color="red">Please enter a password</font>'; }
        elseif ($_GET['error'] == 3) { echo '<font color="red">Please enter a username</font>'; }

    }

    */


    /* FORM VARB's

    username 'name' attribute should be 'username'
    password 'name' attribute should be 'password'
    Login button 'name' attribute should be 'submit'
    */

    // end else


    /*
    END OF FILE
    */
    ?>
    Last edited by Brandon; 02-27-2007 at 07:35 PM.
    Thanks,
    Brandon Long

  5. #5
    dharmil's Avatar
    dharmil is offline x10 Elder dharmil is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Avenel New Jersey
    Posts
    828

    Re: 1,000 points! Help me get a login system working

    um here is the best one i have ever seen that you can download

    http://evolt.org/node/60384

  6. #6
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: 1,000 points! Help me get a login system working

    OK, so if i use the session_start() function, is it gonna give me an error in PHP, cuz every time I use that locally, it gives me this error: "Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0"
    -Chris Z
    Retired Account Manager


  7. #7
    Brandon's Avatar
    Brandon is offline Former Senior Account Rep Brandon is on a distinguished road
    Join Date
    Jun 2006
    Location
    Tewksbury, MA
    Posts
    9,589

    Re: 1,000 points! Help me get a login system working

    Quote Originally Posted by Chris Z View Post
    OK, so if i use the session_start() function, is it gonna give me an error in PHP, cuz every time I use that locally, it gives me this error: "Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0"
    ok so wait, how many session_starts do you have, it is like your HTML you will have like 70;)
    Thanks,
    Brandon Long

  8. #8
    swirly's Avatar
    swirly is offline x10 Elder swirly is an unknown quantity at this point
    Join Date
    Jul 2005
    Location
    NC
    Posts
    965

    Re: 1,000 points! Help me get a login system working

    dharmil gave you the one i was gonna give you lol ehh...its pretty good, its what im using now that i got it set up...if you have any problems ill be glad to help.
    Don't go to bed angry, stay awake and plot revenge.

  9. #9
    Chris Z's Avatar
    Chris Z is offline x10 Spammer Chris Z is an unknown quantity at this point
    Join Date
    Sep 2005
    Location
    Alabama, USA
    Posts
    2,802

    Re: 1,000 points! Help me get a login system working

    I didn't really like that one cuz it looked too confusing. But I tried Brandon's code and it hasn't worked yet. So I may end up trying this one today, after school.
    -Chris Z
    Retired Account Manager


  10. #10
    Zenax's Avatar
    Zenax is offline Lord Of The Keys Zenax is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    The Brilliant United Kingdom
    Posts
    1,339

    Re: 1,000 points! Help me get a login system working

    well I managed to get the one dharmil mentioned working on my PC. The only thing that don't work is the Password reset thingy because I dont have my comp set as a mail server. but other than that it all works and the code is fully commented to so you can figure anything out!

    --
    Zenax
    Regards,
    Zenax

Closed Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. points not working?
    By SEŅOR in forum Free Hosting
    Replies: 4
    Last Post: 02-09-2006, 09:00 PM
  2. suggestion for points system
    By mattspec in forum Feedback and Suggestions
    Replies: 24
    Last Post: 12-03-2005, 05:22 PM
  3. login system help
    By brentcatoe in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 10-04-2005, 04:31 AM
  4. points system
    By IamShipon1988 in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 08-20-2005, 10:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers