<?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!";
}
?>