Switch to full style
Dynamic open source server-side web development
Post a reply

Session Valid

Sat Apr 07, 2007 2:22 pm

Check a Session Variable existence
This is a small code use session for Validation



Remember : Write Session_start(); function in first line , because in some servers the session will
start automatic and it can't start the session twice so will be an warring.

Code:
        session_start();
        
$valid="msi";
        
$_SESSION['valid']=$valid;
        
session_register('valid');

echo 
"next page"


Code:
session_start();
    if(isset(
$_SESSION['valid']))
     {
      echo 
" Session is valid ";
     }
       echo 
" Session is valid "




Post a reply
  Related Posts  to : Session Valid
 session in jsp     -  
 php login with session     -  
 PHP session variables     -  
 EJB session bean     -  
 Modify Session Variables     -  
 Delete session variable     -  
 Session handling using Struts     -  
 Login using session with php and mysql     -  
 tomcat session tracking     -  
 EJB 3.0 Stateful Session Bean Example     -  

Topic Tags

PHP Sessions