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!


Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: PHP Help

  1. #1
    Join Date
    May 2006
    Location
    Wakefield, West Yorkshire
    Posts
    1,118
    Tokens
    0

    Latest Awards:

    Default PHP Help

    Bit of an idiot question but how do I use sessions instead of cookies?

  2. #2
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    session_start("username");
    $_SESSION[username] = '$DBQUERY[username]'
    or it might be

    PHP Code:
    session_start('username');
    $_SESSION[username] = '$DBQUERY[username]'

  3. #3
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    PHP Code:
    session_start("username");
    $_SESSION[username] = '$DBQUERY[username]'
    or it might be

    PHP Code:
    session_start('username');
    $_SESSION[username] = '$DBQUERY[username]'
    Or infact it might even be: LEARN PHP!
    PHP Code:
    if (!isset($_SESSION)) {
      
    session_start();
    }
    $_SESSION['yoursessionnamehere'] == "What ever you want.. When ever you want..";
    $_SESSION['someothersession'] == $myvariable

  4. #4
    Join Date
    Oct 2006
    Location
    UK
    Posts
    166
    Tokens
    0

    Default

    Is this the techtuts user system?

    Change
    PHP Code:
    ob_start(); 
    to
    PHP Code:
    session_start(); 

  5. #5
    Join Date
    Feb 2006
    Location
    Playhabbo Offices
    Posts
    272
    Tokens
    0

    Default

    Dear oh dear oh me! Learn PHP george and stop acting all immature.

    Thanks Adiculantes for this ^^


    ¥ • Playhabbo.co.uk Owner • ¥

    Post Count: 50 - 100 - 150 - 200 - 250 - 300

  6. #6
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Teaspoon View Post
    Or infact it might even be: LEARN PHP!
    PHP Code:
    if (!isset($_SESSION)) {
      
    session_start();
    }
    $_SESSION['yoursessionnamehere'] == "What ever you want.. When ever you want..";
    $_SESSION['someothersession'] == $myvariable
    Was that directed at me??

  7. #7
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    Was that directed at me??
    Well you did post to copys of the same code, as alternatives just becuse you substituted " for ' . Then the code you set to a session was in quotes as well which was completely pointless when you getting it from a variable anyway.... plus for an unknown reason what was stored in the varible looks like it was copied from part of the handling of a mysql query, as opposed to just standard text... So yea, it probably was.

  8. #8
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by 01101101entor View Post
    Well you did post to copys of the same code, as alternatives just becuse you substituted " for ' . Then the code you set to a session was in quotes as well which was completely pointless when you getting it from a variable anyway.... plus for an unknown reason what was stored in the varible looks like it was copied from part of the handling of a mysql query, as opposed to just standard text... So yea, it probably was.
    Well i don't see how because they would work. I didn't think the owner of "Radopanel.co.uk" could tell me to learn php... Fair enough carl or Henious.

    But not Tom rofl

  9. #9
    Join Date
    Jun 2005
    Posts
    4,795
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Jackboy View Post
    Well i don't see how because they would work. I didn't think the owner of "Radopanel.co.uk" could tell me to learn php... Fair enough carl or Henious.

    But not Tom rofl
    I know more PHP that you ''/ When coding PHP I use very good coding practices unlike most people.

    Also how did you figure that since I own RadioPanel I don't know PHP?

    Ask anyone on this forum, apart from you and that know it all stuck up guy (Dave?).

  10. #10
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    693
    Tokens
    0

    Default

    Quote Originally Posted by Jackboy View Post
    Well i don't see how because they would work. I didn't think the owner of "Radopanel.co.uk" could tell me to learn php... Fair enough carl or Henious.

    But not Tom rofl
    Learn php cause you suckz0rs at it m7
    XHTML, CSS, AJAX, JS, php, MySQL.

    --

    HxF moderators can't read timestamps.

Page 1 of 3 123 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
  •