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


    Problems

    Share
    avatar
    PAFaieta

    Number of posts : 8
    Registration date : 2009-03-08

    Problems

    Post  PAFaieta on Mon Mar 09, 2009 7:25 pm

    Hey everyone..

    I've been trying to work with this Login script, but it seems like it's very reliant on there being the exact number of rows in the DB even if they're unused.

    Login seems to work regardless, but I've been trying to add various things and i keep hitting walls. My first try was to try and add Location on register as normal text input, and that failed... after that i tried adding an avatar field for users, which also caused the registration process to fail.

    My question is... can you require only a few fields for registration without having to modify the entire script for things you'd only really edit later? (later being, post-registration) if so, I'd like to know how i can do that.

    EDIT: Yes, I've been through both threads for help on adding fields.
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problems

    Post  Fred-Eric on Mon Mar 09, 2009 10:01 pm

    Check this videotutorial here


    Last edited by Fred-Eric on Tue Mar 10, 2009 8:11 am; edited 1 time in total


    _________________
    Appologize for my bad english, I am speaking french.
    ------------------------------------
    Visit my blog: How To Make a Login System for Your Website
    avatar
    PAFaieta

    Number of posts : 8
    Registration date : 2009-03-08

    Re: Problems

    Post  PAFaieta on Mon Mar 09, 2009 11:00 pm

    Fred-Eric wrote:Check this videotutorial here

    It seems as though you've totally ignored my question...

    I was NOT asking you to show me visually how to add new fields.. My question was centered around altering the database without it messing up register.php as well as other scripts. As it stands, if i add something as simple as an avatar field, it screws up registration... and it shouldn't do that. Additionally, i indicated that i had read over the posts shown in the video.

    My question... again... is how do i add fields that will function in the database.. AFTER the registration process as editable fields for the user profile. That's all i want to know. Currently, this forum has that. I can register with less data than i would need to edit my profile.

    Please consider actually reading my post before directing me to the same things over again.
    avatar
    Fred-Eric

    Number of posts : 63
    Registration date : 2007-05-13

    Re: Problems

    Post  Fred-Eric on Tue Mar 10, 2009 10:11 am

    The problem why you cannot register is in your SQL query in the database.php file under addNewUser function.

    If you have more field than the actual login system you must add those field in your SQL query:

    for exemple: if you would like to not showing a field during the registration but only in the edit page, do this:

    add blank string '' to your SQL query under addNewUser function:
    Code:

    $q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '0', $ulevel, '$email', $time, '', '')";     
       return mysql_query($q,$this->connection);



    Hope this will solve your problem.


    _________________
    Appologize for my bad english, I am speaking french.
    ------------------------------------
    Visit my blog: How To Make a Login System for Your Website
    avatar
    PAFaieta

    Number of posts : 8
    Registration date : 2009-03-08

    Re: Problems

    Post  PAFaieta on Tue Mar 10, 2009 10:34 am

    Fred-Eric wrote:The problem why you cannot register is in your SQL query in the database.php file under addNewUser function.

    If you have more field than the actual login system you must add those field in your SQL query:

    for exemple: if you would like to not showing a field during the registration but only in the edit page, do this:

    add blank string '' to your SQL query under addNewUser function:
    Code:

    $q = "INSERT INTO ".TBL_USERS." VALUES ('$username', '$password', '0', $ulevel, '$email', $time, '', '')";     
       return mysql_query($q,$this->connection);



    Hope this will solve your problem.


    Thanks very much.. I'll try that out, and post here about how it turns out.


    EDIT: Excellent! that completely solved my problem Smile thanks again.
    avatar
    elvin66

    Number of posts : 24
    Registration date : 2009-03-13

    Re: Problems

    Post  elvin66 on Tue Mar 17, 2009 12:41 am

    Fred-Eric wrote:Check this videotutorial here

    I had my login and registration working great but after following the video advise, I can no longer either register a new user or login. I thought I followed the instructions to the letter although it was hard to watch as the full screen was not showing and I could not copy and paste from a video.

    Main problem is after filling out the form with several new fields, and clicking the 'Join' button, I get "1 error(s) found" message in red on top of the form fields but nothing down the length of the form so I don't know where the error is.

    Any ideas ?
    avatar
    PAFaieta

    Number of posts : 8
    Registration date : 2009-03-08

    Re: Problems

    Post  PAFaieta on Tue Mar 17, 2009 12:45 am

    I would just check to see that the field IDs are done properly.

    If something isn't referenced correctly, and i have had that problem, it's not going ro forward the data properly even if everything else is done perfectly.

    so, just go back to the form and check the name property in the HTML. As well, see that it's posted correctly to process, etc.
    avatar
    elvin66

    Number of posts : 24
    Registration date : 2009-03-13

    Re: Problems

    Post  elvin66 on Tue Mar 17, 2009 1:46 am

    PAFaieta wrote:I would just check to see that the field IDs are done properly.

    If something isn't referenced correctly, and i have had that problem, it's not going ro forward the data properly even if everything else is done perfectly.

    so, just go back to the form and check the name property in the HTML. As well, see that it's posted correctly to process, etc.

    I just checked the spelling etc in register.php and everything is spelled correctly as far as I can see. Here is the section that holds the form.....


    <form action="process.php" method="POST">
    <table align="left" border="0" cellspacing="0" cellpadding="3">
    <tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
    <tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
    <tr><td>First Name:</td><td><input type="text" name="firstname" maxlength="30" value="<? echo $form->value("firstname"); ?>"></td><td><? echo $form->error("firstname"); ?></td></tr>
    <tr><td>Family Name:</td><td><input type="text" name="sirname" maxlength="30" value="<? echo $form->value("sirname"); ?>"></td><td><? echo $form->error("sirname"); ?></td></tr>
    <tr><td>Address 1:</td><td><input type="text" name="address1" maxlength="40" value="<? echo $form->value("address1"); ?>"></td><td><? echo $form->error("address1"); ?></td></tr>
    <tr><td>Address 2:</td><td><input type="text" name="address2" maxlength="40" value="<? echo $form->value("address2"); ?>"></td><td><? echo $form->error("address2"); ?></td></tr>
    <tr><td>Suburb:</td><td><input type="text" name="suburb" maxlength="30" value="<? echo $form->value("suburb"); ?>"></td><td><? echo $form->error("suburb"); ?></td></tr>
    <tr><td>City:</td><td><input type="text" name="city" maxlength="20" value="<? echo $form->value("city"); ?>"></td><td><? echo $form->error("city"); ?></td></tr>
    <tr><td>Post Code:</td><td><input type="text" name="postcode" maxlength="5" value="<? echo $form->value("postcode"); ?>"></td><td><? echo $form->error("postcode"); ?></td></tr>
    <tr><td>Phone:</td><td><input type="text" name="phone" maxlength="12" value="<? echo $form->value("phone"); ?>"></td><td><? echo $form->error("phone"); ?></td></tr>
    <tr><td>Mobile:</td><td><input type="text" name="mobile" maxlength="15" value="<? echo $form->value("mobile"); ?>"></td><td><? echo $form->error("mobile"); ?></td></tr>
    <tr><td>Fax:</td><td><input type="text" name="fax" maxlength="12" value="<? echo $form->value("fax"); ?>"></td><td><? echo $form->error("fax"); ?></td></tr>

    <tr><td colspan="2" align="right">
    <input type="hidden" name="subjoin" value="1">
    <input type="submit" value="Join!"></td></tr>
    <tr><td colspan="2" align="left"><a href="index.php">Back to Main</a></td></tr>
    </table>
    </form>



    Can you see any typos in there ??

    Thanks
    avatar
    elvin66

    Number of posts : 24
    Registration date : 2009-03-13

    Re: Problems

    Post  elvin66 on Tue Mar 17, 2009 8:42 pm

    I found the problem

    On the actual registration form I had left out the email field or somehow deleted it when I added the other fields. So all the code is looking for 'email' and it wasn't getting a value as noe was entered.
    Thanks anyway
    avatar
    PAFaieta

    Number of posts : 8
    Registration date : 2009-03-08

    Re: Problems

    Post  PAFaieta on Thu Mar 19, 2009 11:30 pm

    Hey

    sorry about the delay in response..

    glad to hear it's solved btw.

    Sponsored content

    Re: Problems

    Post  Sponsored content


      Current date/time is Wed Nov 14, 2018 12:26 am