PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Mihai Vilcu   PHP Rating class   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: PHP Rating class
Record and show user ratings stored in files
Author: By
Last change:
Date: 11 years ago
Size: 401 bytes
 

Contents

Class file image Download
<?php

// simple example on how you can integrate it in your system

include "rating_system.php";


$rating = new rating_system($_SERVER['REMOTE_ADDR'], 10);

// just some dump data

for($i = 0; $i < 10; $i++){
    echo
"<b>This is item $i </b><br/>";
   
$rating->show_vote_options("vote.php", $i);
    echo
"<br/> Current rating for item $i is ";
   
$rating->show_rating($i);
    echo
"<hr>";

}