PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of german gomez bajo   Simple comments   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: it a simple example
Class: Simple comments
Store and show user comments in site pages
Author: By
Last change: Just added some anotations
Date: 13 years ago
Size: 660 bytes
 

Contents

Class file image Download
<?php
/*you must type this lines in all pages you want comments*/
include_once("class.display.php");
$start = new showSomething;
$start -> start();
/*-------------------------------------------------------*/
?>
<html>
<head>
    <title>This is my page!</title>
</head>
<body>
<h2>form</h2>
<?php
$form
= new showSomething;
$form -> showForm("yes"); // type "yes" or "no" to anable or disable the form displaying
?>
<h2>Comment list</h2>
<?php
$comments
= new showSomething;
$comments -> showComments(0); // type 0 if you want to show all the comment list, or a specific number to show just that number of comments
?>
</body>
</html>