Login   Register  
PHP Classes
elePHPant
Icontem

File: login.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 5 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');
}
?>