PHP Classes

File: makeSecure.php

Recommend this page to a friend!
  Classes of Andrew   Login Script   makeSecure.php   Download  
File: makeSecure.php
Role: Example script
Content type: text/plain
Description: include to make files secure
Class: Login Script
Authenticate users with records in a MySQL table
Author: By
Last change: added redirect
Date: 16 years ago
Size: 495 bytes
 

Contents

Class file image Download
<?php
/**
 * makeSecure.php
 *
 * This file is included at the top of any page you wish to make secure with a login.
 *
 * Access will be granted only if they are logged in, else returned to login page.
 *
 * Usage: require('makeSecure.php');
 *
 */

session_start();
require(
'LoginSystem.class.php');

$loginSys = new LoginSystem();

/**
 * if not logged in goto login form, otherwise we can view our page
 */
if(!$loginSys->isLoggedIn())
{
   
header("Location: loginForm.php");
    exit;
}



?>