PHP Classes

File: ajax_rate.php

Recommend this page to a friend!
  Classes of Subin Siby   Francium PHP 5 Star Rating System   ajax_rate.php   Download  
File: ajax_rate.php
Role: Example script
Content type: text/plain
Description: JavaScript sends AJAX request to this file to submit rating.
Class: Francium PHP 5 Star Rating System
Record star ratings of items in a MySQL with AJAX
Author: By
Last change:
Date: 8 years ago
Size: 287 bytes


Class file image Download
// This is where AJAX would sent request to

if(isset($_POST['id']) && isset($_POST['rating']) && $_POST['id'] == "index_page"){
__DIR__ . "/config.php";
$star->id = $_POST['id'];
$star->addRating($_SESSION['user_id'], $_POST['rating']);