PHP Login System with Admin Features

This forum was created to talk about the PHP Login System with admin features created by jpmaster77 on evolt's website


    Registration not working (unmodified script)

    Share
    avatar
    Ready

    Number of posts : 2
    Registration date : 2010-09-06

    Registration not working (unmodified script)

    Post  Ready on Mon Sep 06, 2010 5:09 pm

    So, I've been playing around with this little script and everything seems to work perfectly fine. Except when I tried to register another account (aside from my admin account) it gives me an error
    "We're sorry, but an error has occurred and your registration for the username Ready2, could not be completed.
    Please try again at a later time."
    So I got back to the original (unmodified) script and found that I've got the same error as with my modified version.

    I dug a little and found that it gets "stuck" in line 321 in sesseion.php:
    if($database->addNewUser($subuser, md5($subpass), $subemail)){
    and the function always returns 2 -_-

    But since its already 11pm over here I just wanted to stop by and see if its a known error or if somebody already has a solution for it before I hit the sack for tonight. If not I'll probably just throw out the whole register.php and re-write my own registration script if I cant fix it haha

    I tested it on a local xampp 1.7.3 server (PHP Version 5.3.1) and on a live server (PHP Version 5.2.0-8+etch16) but its the same result on both Sad

    - Ready
    avatar
    Ready

    Number of posts : 2
    Registration date : 2010-09-06

    Re: Registration not working (unmodified script)

    Post  Ready on Tue Sep 07, 2010 2:40 am

    Problem solved Smile

    Or so it appears at least.
    It seems as if the actual sql query was the problem. If you edit line 152 in database.php and specifiy which fields to use when inserting a new row into it works just fine.
    $q = "INSERT INTO ".TBL_USERS." (username, password, userid, userlevel, email, timestamp) VALUES ('$username', '$password', '0', $ulevel, '$email', $time)";

      Current date/time is Tue Sep 19, 2017 9:22 am