PHP Classes

File: login.php

Recommend this page to a friend!
  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: 8 years ago
Size: 1,274 bytes


Class file image Download
$_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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

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