Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default Store session variables?

    Basically say if I had a basic register form, I.E:

    Username
    Password
    Email

    And say I wanted it so lets say they missed the email field, it would bounce them back to the page, but Username would still be there from when they first filled it in (Obviously wouldn't store the password until they register)

    How can I go about doing it? Never tried it before.

  2. #2
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Just load the same page again but include the variables in the form. I don't know how you've structured everything so I can't make a precise suggestion.
    Chippiewill.


  3. #3
    Join Date
    Jul 2007
    Location
    UK
    Posts
    2,470
    Tokens
    2,975

    Latest Awards:

    Default

    Quote Originally Posted by Chippiewill View Post
    Just load the same page again but include the variables in the form. I don't know how you've structured everything so I can't make a precise suggestion.
    Its not finished yet but this is what is there so far:
    http://pastebin.com/bEdp4tsS

  4. #4
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    In that case I'd just make the form's action the same page as it's submitted from, then in each input tag add something like

    value='<?php echo $_GET["name"]; ?>'
    Chippiewill.


  5. #5
    Join Date
    Jan 2013
    Location
    localhost
    Posts
    63
    Tokens
    412
    Habbo
    AaidenX

    Latest Awards:

    Default

    Well

    change $_GET/$_POST to the method you used for your form.

    <input type='text' value='<?php echo $_POST['username']; ?>' name='username'>
    <input type='text' value='<?php echo $_POST['email']; >?' name='email'>

    etc, etc, simple? this is not a session variable.

Posting Permissions

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