PHP code example of joefallon / phpflash

1. Go to this page and download the library: Download joefallon/phpflash library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joefallon / phpflash example snippets


loadMessagesFromSession()

storeInfoMessage($message, $storeInSession = true)
retrieveInfoMessages()

storeSuccessMessage($message, $storeInSession = true)
retrieveSuccessMessages()

storeWarningMessage($message, $storeInSession = true)
retrieveWarningMessages()

storeErrorMessage($message, $storeInSession = true)
retrieveErrorMessages()

$flash1 = new FlashMessages();
$flash1->storeInfoMessage('my info message', true);

$flash2 = new FlashMessages();
$flash2->loadMessagesFromSession();
$infoMessages = $flash2->retrieveInfoMessages();

$flash = new FlashMessages();
$flash->storeInfoMessage('my info message', false);

$infoMessages = $flash->retrieveInfoMessages();