PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Muhammad Umer Farooq   PHP SysMsg Class   index.php   Download  
File: index.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP SysMsg Class
Output application event messages
Author: By
Last change: Apply fixes from StyleCI
remove unnecessary code
Date: 5 years ago
Size: 1,337 bytes


Class file image Download
require_once 'init.php';
if (
is_submit('submit')) {
    if (
input('q')) {
system_message('Comment added successfully', 'success');
//store to database and return to this or another page
       //echo '<div class="container">'. restore_new_lines(input('q')) . '</div>';
} else {
system_message('Can not send empty comment', 'error');

  <title>PHP Systen Message class example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="">
  <script src=""></script>
  <script src=""></script>
  <script src=""></script>
<div class="container">
  <form method='post'>
    <div class="form-group">
      <label for="comment">Comment:</label>
      <textarea class="form-control" rows="5" name='q'></textarea>
      <input type='submit' name='submit' class="btn btn-success" value='Submit' />