Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if(!session_is_registered(`name`))
- {
- header("location: login.php");
- }
- $user = session_is_registered(`name`);
- $pass = session_is_registered(`pwd`);
- echo "<h3>" . $user . "</h3>";
- ?>
- session_start();
- $_SESSION['blah']= "blah blah";
- if(isset($_SESSION['blah']) && !empty($_SESSION['blah'])) {
- echo 'Set and not empty, and no undefined index error!';
- }
- session_start();
- if(array_key_exists('blah',$_SESSION) && !empty($_SESSION['blah'])) {
- echo 'Set and not empty, and no undefined index error!';
- }
Add Comment
Please, Sign In to add comment