PHP Classes

File: login.php

Recommend this page to a friend!
  Classes of oran   Login Script with PDO   login.php   Download  
File: login.php
Role: Example script
Content type: text/plain
Description: sample login
Class: Login Script with PDO
Manage user accounts stored in a database with PDO
Author: By
Last change:
Date: 14 years ago
Size: 328 bytes
 

Contents

Class file image Download
<?php
require_once 'sys.class.php';

$login = new login;

$login->SetUsername("oran");
$login->SetPassword("dsfsdfsdfg");
$error = $login->CheckLogin();

echo
$error;


 
session_start();
if(isset(
$_SESSION['username']))
{
   
    echo
"user {$_SESSION['username']} loged in ";
}
else
{
   
header('location: yourloginpage.com');
}
?>