SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    session functions has been removed from PHP-5.4.0 ???

    http://en.wikipedia.org/wiki/PHP

    5.4.0 RC3 2011-12-08 Trait Support, Removed items: register_globals, safe_mode, allow_call_time_pass_reference, session_register(), session_unregister() and session_is_registered(). Several improvements to existing features.
    I been teaching myself how to use these functions for over a week. What do we use now as the replacement?

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Posts
    1,850
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    For starters you can create session variables using the $_SESSION superglobal.

    $_SESSION['name'] = 'max21b'

    http://www.php.net/manual/en/functio...n-register.php
    http://www.php.net/manual/en/reserve...es.session.php

  3. #3
    Founder of Primal Skill Ltd. feketegy's Avatar
    Join Date
    Aug 2006
    Posts
    482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't register variables in the session with session_register anymore.

    Instead use $_SESSION['variable'] = 'value'; to register variables.
    And unset($_SESSION['variable']); to remove variables from the session.


Bookmarks

Posting Permissions

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