make $_SESSION[] global

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sahm

    make $_SESSION[] global

    Hi every one
    I have project I need to make the value of $_SESSION[] available for
    function in another php file
    can any one help me to fix my problem
    I will be thank full

    Best
    Salim
  • Michael Fesser

    #2
    Re: make $_SESSION[] global

    ..oO(sahm)
    >I have project I need to make the value of $_SESSION[] available for
    >function in another php file
    >can any one help me to fix my problem
    $_SESSION is a superglobal array, it's available from within any
    function in any script. Just make sure that you call session_start() at
    the very beginning of _every_ page to open the session. After that you
    can simply access the data.

    Micha

    Comment

    • sahm

      #3
      Re: make $_SESSION[] global

      On Feb 16, 7:24 pm, Michael Fesser <neti...@gmx.de wrote:
      .oO(sahm)
      >
      I have project I need to make the value of $_SESSION[] available for
      function in another php file
      can any one help me to fix my problem
      >
      $_SESSION is a superglobal array, it's available from within any
      function in any script. Just make sure that you call session_start() at
      the very beginning of _every_ page to open the session. After that you
      can simply access the data.
      >
      Micha
      Dear Micha
      Thank you for your help
      Best Salim

      Comment

      • Michael Fesser

        #4
        Re: make $_SESSION[] global

        ..oO(sahm)
        >Dear Micha
        >Thank you for your help
        >Best Salim
        You're welcome.

        Micha

        Comment

        Working...