PHP Classes

File: issues/14/msg.php

Recommend this page to a friend!
  Classes of Yuriy Tkachenko  >  Simple Flash Messages  >  issues/14/msg.php  >  Download  
File: issues/14/msg.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple Flash Messages
Display message with different CSS frameworks
Author: By
Last change:
Date: 6 months ago
Size: 492 bytes
 

Contents

Class file image Download
<?php
if (!session_id()) @session_start();
require_once(
'../../vendor/autoload.php');

use
Tamtamchik\SimpleFlash\TemplateFactory;
use
Tamtamchik\SimpleFlash\Templates;
?>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css">

<a href="create_msg.php">Create message</a>

<h2>MESSAGES</h2>

<?php
if (flash()->hasMessages('info')) {
    echo
flash()->setTemplate(TemplateFactory::create(Templates::TAILWIND))->display('info');
}

For more information send a message to info at phpclasses dot org.