PHP Classes

File: vote.php

Recommend this page to a friend!
  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: 3 years ago
Size: 352 bytes


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

if($_POST) {

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

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