User Tools

Site Tools


uphp:functions:session_destroy

Differences

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

Link to this comparison view

Next revision
Previous revision
uphp:functions:session_destroy [2017/05/13 12:08]
admin created
uphp:functions:session_destroy [2021/09/13 05:57] (current)
Line 1: Line 1:
-session_destroy()+======session_destroy======
  
-This is only applicable for HTTP initiated scripts.  An internal $_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 a cookie created at login.+<badge>WMPRO, WMMINI >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> 
 + 
 +Clear the current session's data 
 + 
 +====Description==== 
 + 
 +<well size="sm"><html> 
 +<span style="font-size:125%">session_destroy ( ) 
 +</html></well> 
 + 
 +This is only applicable for HTTP initiated scripts.  An internal ''$_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 a cookie created at login. 
 + 
 +This function clears the array.  This would clear specific variables like logged_in, an integer indicating whether the user is logged in, so if a page in WattmonOS (such as the home page) is called after running this function, you would be redirected to the login page once again. 
 + 
 +====Parameters==== 
 + 
 +None 
 + 
 +====Return Values==== 
 + 
 +None 
 + 
 +====See Also==== 
 + 
 +[[uphp:uPHP Special Variables]] - Special arrays that are populated automatically (including ''$_SESSION''
 + 
 +[[session_is_new()]] - Check if a session was just initiated 
 + 
 +[[session_start()]] - Initiate a new session and send the cookie data for it
  
-session_destroy() clears the array.  This would clear specific variables like logged_in, an integer indicating whether the user is logged in, so a page in WattmonOS (such as the home page) is called after running this function, you would be redirected to the login page once again. 
uphp/functions/session_destroy.1494677280.txt.gz · Last modified: 2021/09/13 05:56 (external edit)