PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Dave Hale  >  Login Controller  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: Login Controller
Manage registration and authentication of users
Author: By
Last change:
Date: 7 years ago
Size: 1,056 bytes


Class file image Download
include '';

//to display login bar

/*to display login forms such as registration / email password etc
    this function can take a form name as paramater and therefore force showing
    a page even if user interction with the login bar doesn't call for one */

/* to display any messages. error messages and form validation all in one.
    should be two variables both retrieved via function calls but... */
echo $loginController->msg;

/* to display forms relating to this class and not run past.
    function returns true if page(form) shown or false if not */
if( !$loginController->display_page ()){
i>do something else</i>
     } else {
i>stuff to do after reg form etc rendered</i>
//function will return name or false
echo '<br/>username = '.$loginController->get_username();

//function will return user ID or false
echo '<br />user ID ='.$loginController->get_userId();

$loginController->display_page ();