Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set("display_errors", 1);
- session_start();
- if (isset($_SESSION['Mobile'])) {
- echo $_SESSION['Mobile'] . " Session <a href='logout.php'>logout</a>";
- }else if(isset($_COOKIE['Mobile'])){ //when user is logged with cookies
- echo $_COOKIE['Mobile'] . " cookie <a href='logout.php'>logout</a>";
- }else{ //when user is not loggedin
- header("Location: login.php");
- exit();
- }
- ?>
- Welcome <?php echo $Mobile;?>
Advertisement
Add Comment
Please, Sign In to add comment