Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bryan  >  Flash Message  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Flash Message
Store message to show to user in session variables
Author: By
Last change:
Date: 2010-08-20 08:25
Size: 367 bytes
 

Contents

Class file image Download
<?php session_start() ?>
<?php 
include('class.flash.php'?>

<?php 
  $flash 
= new Flash(); 
  
$flash->setFlash('sample','You are welcome!');
  
  
// now check if there is a flash message
  
if ($flash->hasFlash('sample'))
  {
    echo 
$flash->getFlash('sample'); // output the flash message
  
}else{
    echo 
"There is no flash message, sorry!";
  }
?>