Login   Register  
PHP Classes
elePHPant
Icontem

File: vote.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mihai Vilcu  >  PHP Rating class  >  vote.php  >  Download  
File: vote.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: 1 year ago
Size: 352 bytes
 

Contents

Class file image Download
<?php
// this is the file where the votes are sent
// if the vote is successfull it should return 'ok'
// else anything else :)

if($_POST) {
    include 
"rating_system.php";

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

    
$rating->set_rating($_POST['item'], $_POST['score']);
    
    
header("Location: ".$_SERVER["HTTP_REFERER"]);
}