Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40
  1. #11
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    307
    Tokens
    0

    Default

    Also, you made an error here.. You forgot to close the tag.

    Code:
     
    <?php
     
    session_start();
    session_destroy();
     
    die("You have successfully logged out. <a href='login.php'>Login</a>");
     
    ?>
    Edited by Invent (Forum Moderator): Fixed original post
    Last edited by Invent; 01-08-2008 at 02:31 PM.

  2. #12
    Join Date
    Jan 2008
    Posts
    3,711
    Tokens
    100

    Latest Awards:

    Default

    Great tutorial!

  3. #13
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    307
    Tokens
    0

    Default

    Any chance of an editprofile code coming up soon pls?

  4. #14
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Lol I'll do it now


  5. #15
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Ew, couldn't edit post

    I can't do the edit profile script right now, as I am quite busy plus it would require me actually adding fields for the user to change therefore, me changing the register script too.


  6. #16
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    First of all go on your mysql database, click the SQL tab and drop this code in:

    ALTER TABLE `users` (
    `id` int(10) NOT NULL auto_increment,
    `email` varchar(30) NOT NULL default '',
    `habbo` varchar(30) NOT NULL default '',
    `password ` varchar(30) NOT NULL default ",
    PRIMARY KEY (`id`)
    ) TYPE=MyISAM;

    Then call this file edit.php and put in this (not sure if it works, haven't tested it):
    PHP Code:
    <?php
    session_start
    ();
    include 
    'config.php';
    if (isset(
    $_SESSION[logged_in])) {
        if (isset(
    $_POST[update])) {
            
    $email addslashes(htmlspecialchars($_POST[email]));
            
    $habbo addslashes(htmlspecialchars($_POST[habbo]));
            
    $password md5($_POST[password]);
            
    $upd mysql_query("UPDATE users SET email = '$email', habbo = '$habbo', password = '$password' WHERE username = '$username'");
            echo 
    "Profile updated!";
        } 
    } else {
        echo 
    "<form method='post' action='edit.php?edit'>
        Email:<br>
        <input type='text' name='email' size='20'><br>
        Habbo name:<br>
        <input type='text' name='habbo' size='20'><br>
        Password:<br>
        <input type='password' name='password' size='20'><br>
        <input type='submit' name='update' value='Update'>"
    ;
    }
    ?>
    Last edited by Excellent; 03-08-2008 at 02:07 PM.

  7. #17
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Cheers

    See, as if by magic one appeared.


  8. #18
    Join Date
    Apr 2008
    Location
    England.
    Posts
    1,324
    Tokens
    0

    Latest Awards:

    Default

    No problem If theres some other files that need doing I'm sure me and luke will work together to put them in here

  9. #19
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Of course


  10. #20
    Join Date
    Apr 2006
    Location
    Australia
    Posts
    307
    Tokens
    0

    Default

    One problem.. When I'm logged out I can see it, but when I'm not logged in it's just a blank page.

Page 2 of 4 FirstFirst 1234 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
  •