sessionRead

Description

Reads and returns the data for the specified session.

Syntax

bool sessionRead (string $session_id)



Parameter $session_id

Expected type: String
Description: A valid PHP session ID



Return value

Expected type: Boolean
Description: Returns session data if query was successful, false if the session ID was invalid, or dies with an error if the query failed


Notes

  • Used as callback for session_set_save_handler
  • Only used when database-driven sessions are enabled
  • Reads the session info from the database
  • Returns false if the session ID is invalid
  • Returns the results of the query if successful
  • Dies with an error if the query failed
Advertisement: