Skip to content

zhandos717/Flash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

1. Installation

Flash messages on PHP sessions

<?php
    include '../src/Flash.php';
    $flashMessage = new FlasMessage();

2. Adding a message

2.1. Add messages using the setMessage method

the first parameter is the status, the second parameter is the message text

<?php
    $flashMessage->setMessage('success', 'Hello, world!');

2.2. checking a message for existence

We simply pass the key of the message we need, if there is a key, it returns the truth, if not, then false

<?php
    $flashMessage->issetMessage('success');

2.3. Displaying a message

As well as in the issetMessage method, we simply send the key, it will display the found message by the key, then destroy it using the unset function

<?php
    $flashMessage->getMessage('success');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages