User Tools

Site Tools


uphp:functions:session_start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
uphp:functions:session_start [2017/05/13 12:19]
admin created
uphp:functions:session_start [2021/09/13 05:57] (current)
Line 1: Line 1:
-session_start()+======session_start======
  
-Start a new session and clear any existing session information.  This generates a random session ID and passes it as a cookie back to the browserso session_start needs to be called before any other data is sent out/+<badge>WMPROWMMINI >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-You can then set session variables through the global $_SESSION array.+Initiate a new session and send the cookie data for it
  
-For example:+====Description====
  
-$_SESSION['name']="tom";+<well size="sm"><html> 
 +<span style="font-size:125%">session_start ( ) 
 +</html></well> 
 + 
 +This function will start a new session and clear any existing session information.  This generates a random session ID and passes it as a cookie back to the browser, so it needs to be called before any other data is sent out.  You can then set session variables through the global ''$_SESSION'' array. 
 + 
 +This is only applicable for HTTP initiated scripts.  The ''$_SESSION'' array is available to all HTTP scripts to allow for persistent variables to be shared between scripts.  This array is associated with the script based on the cookie created. 
 + 
 +====Parameters==== 
 + 
 +None 
 + 
 +====Return Values==== 
 + 
 +None 
 + 
 +====See Also==== 
 + 
 +[[uphp:uPHP Special Variables]] - Special arrays that are populated automatically (including ''$_SESSION''
 + 
 +[[session_destroy()]] - Clear the current session's data 
 + 
 +[[session_is_new()]] - Check if a session was just initiated
  
uphp/functions/session_start.1494677948.txt.gz · Last modified: 2021/09/13 05:56 (external edit)