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 martin barker  >  .passport Client  >  login.php  >  Download  
File: login.php
Role: Example script
Content type: text/plain
Description: a Sample login page to another site
Class: .passport Client
Authenticate users in a remote server
Author: By
Last change:
Date: 6 years ago
Size: 1,274 bytes
 

Contents

Class file image Download
<?php
session_start
();
if(
$_REQUEST['active'] == 'yes'){// Have they used the login form
require_once('login.cls.php'); // Load Class into memory
$passport = new Passport// connect to memeory
$passport->login($_POST['user'], $_POST['pass'], 'rjky6t5bg437''r5kjp9lk'); // handle login

if(isset($_SESSION['userid'])){// what to do when users are loged in

}
}else{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="" method="post">
<input type="hidden" name="active" value="yes" />
<table width="208" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="117"><div align="right">Username:</div></td>
    <td width="144"><input type="text" name="user" /></td>
  </tr>
  <tr>
    <td><div align="right">Password:</div></td>
    <td><input type="password" name="pass" id="pass" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="right">
      <input type="submit" value="Login" />
    </div></td>
  </tr>
</table>
</form>
</body>
</html>
<?php
}
?>