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.



Single Articles
Create HTML Login formPHP Login Tutorial
Create PHP File for Login Check User and PasswordPHP Login Tutorial
Now, Create Login redirect PagePHP Login Tutorial
Finally, Create a pgae to logoutPHP Login Tutorial


Related Articles
How to Login Without Database PHP Login Tutorial

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