Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: usersystem help

  1. #1
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    1,788
    Tokens
    0

    Latest Awards:

    Default usersystem help

    ok i used the usersystem tut on techtuts.com and have the whole thing up - but whrn i log in - it goes to the welcome page liek i made it but when i click edit profile it just says you are not logged in :S

    i dont know why

    www.werehabbo.com <- on there

  2. #2
    Join Date
    Apr 2006
    Posts
    371
    Tokens
    0

    Default

    Have you included config.php, have you started the buffering?

  3. #3
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    1,788
    Tokens
    0

    Latest Awards:

    Default

    yes i added the config.php - if i didnt - the page wouldnt of worked ... buffereing?

  4. #4
    Join Date
    Feb 2006
    Location
    Befordshire, England
    Posts
    672
    Tokens
    0

    Default

    Edit : just read your post, if you followed the tutorial Correctly it should work!

    Daza
    Last edited by D3stroyer; 16-04-2006 at 04:05 PM.

  5. #5
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    1,788
    Tokens
    0

    Latest Awards:

    Default

    i did follow the tut right - i added the config.php and members only page code :s bah im lost :s

  6. #6
    Join Date
    Feb 2006
    Location
    Befordshire, England
    Posts
    672
    Tokens
    0

    Default

    At the top of members only page code did you include the config.php in the members only page code.

    Daza

  7. #7
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    1,788
    Tokens
    0

    Latest Awards:

    Default

    ok this what I got

    Quote Originally Posted by editprofile.php
    <?
    ob_start();
    include("config.php");
    if ($logged[username])
    {
    // the user is logged in! We continue...
    if (!$_POST[update])
    {
    // the form hasn't been submitted. We continue...
    $profile = mysql_query("SELECT * from users where username = '$logged[username]'");
    $profile = mysql_fetch_array($profile);
    // the above lines get the information so that it can be displayed in the html form.
    echo("
    <center><form method=\"POST\">
    <table width=\"100%\">
    <tr>
    <td align=\"right\" width=\"25%\">
    <font size=\"1\" face=\"verdana\" color=\"#000000\">Location</font>
    </td>
    <td align=\"left\">
    <input type=\"text\" size=\"25\" maxlength=\"25\" name=\"locate\" value=\"$profile[location]\"></td>
    </tr>
    <tr>
    <td align=\"right\" width=\"25%\">
    <font size=\"1\" face=\"verdana\" color=\"#000000\">Hotel</font>
    </td>
    <td align=\"left\">
    <input size=\"25\" name=\"msn\" value=\"$profile[msn]\"></td>
    </tr>
    <tr>
    <td align=\"right\" width=\"25%\">
    <font size=\"1\" face=\"verdana\" color=\"#000000\">Favorite Piece of furni</font></td>
    <td align=\"left\">
    <input size=\"25\" name=\"aim\" value=\"$profile[aim]\"></td>
    </tr>
    <tr>
    <td align=\"right\" width=\"25%\">
    <font size=\"1\" face=\"verdana\" color=\"#000000\">Habbo Name</font></td>
    <td align=\"left\">
    <input size=\"25\" name=\"email\" value=\"$profile[email]\"></td>
    </tr>
    <tr>
    <td align=\"center\">
    </td>
    <td align=\"left\">
    <input type=\"submit\" name=\"update\" value=\"Update\"></td>
    </tr>
    </table>
    </form>
    </center>");
    }
    else
    {
    $email = htmlspecialchars($_POST[email]);
    $aim = htmlspecialchars($_POST[aim]);
    $msn = htmlspecialchars($_POST[msn]);
    $locate = htmlspecialchars($_POST[locate]);
    // the above lines get rid of all html.
    echo ("Your profile has been updated!");
    $update = mysql_query("Update users set email = '$email',
    msn = '$msn', aim = '$aim', location = '$locate' where username = '$logged[username]'");
    // updates the information in the database.
    }
    }
    else
    {
    // They aren't logged in!
    echo ("<a href=\"login.php\"><font size=\"1\" face=\"verdana\" color=\"#000000\">You must login</font></a>");
    }
    ?>
    anyone tell me whats wrong - i didnt add the members only code at top - but where do i add - can someone combine the codes for me

    and this is the code for members page only

    Quote Originally Posted by members only
    <?
    ob_start();
    include("config.php");
    if ($logged[username])
    {
    echo("You are logged in");
    }
    else
    {
    echo("You are not logged in");
    }
    ?>

  8. #8
    Join Date
    Feb 2006
    Location
    Befordshire, England
    Posts
    672
    Tokens
    0

    Default

    In the codes, you're not ament to just copy and paste and i can see that because the comments are still in delete them and that will help other than that i can't see any problems.

    Daza

  9. #9
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    1,788
    Tokens
    0

    Latest Awards:

    Default

    let me try this
    Last edited by iNicks; 16-04-2006 at 05:24 PM.

  10. #10
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    1,788
    Tokens
    0

    Latest Awards:

    Default

    Ok I tryed what you said -

    Still dont work - I get this when I log in, it works



    Then when I click Edit Profile - it goes to


Page 1 of 2 12 LastLast

Posting Permissions

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