Horje

Now, Create Login redirect Page

Copy and Paste Following code to welcome.php After login, It will appear Login Session Page. Put following code in any php file where you want to show Login Session. <?php session_start(); ?>
welcome.php
Example: PHP
<?php session_start(); /* Starts the session */

if(!isset($_SESSION['UserData']['Username'])){
        header("location:login.php");
        exit;
}
?>

Congratulation! You have logged into password protected page. <a href="logout.php">Click here</a> to Logout.



Related Articles
How to Login Without Database PHP Login Tutorial

Single Articles

Type:
Php
Category:
Web Tutorial
Sub Category:
PHP Login Tutorial
Uploaded by:
Admin



Share on: