Go Back   Gaming Gutter


» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Viva Pinata Party Animals
10-18-2008 10:26 PM
by Aethean
Last post by Aethean
Today 05:24 PM
4 Replies, 60 Views
Go to first new post Quick sale ASAP! Really...
Today 05:07 PM
Last post by girlikecupcake
Today 05:20 PM
1 Replies, 9 Views
Go to first new post What are you currently...
09-12-2008 04:16 PM
by Ocean
Last post by Pandox
Today 05:15 PM
234 Replies, 1,501 Views
Go to first new post [B] a 4 month+ Account...
Today 12:56 PM
by Rayde
Last post by Rayde
Today 05:07 PM
4 Replies, 16 Views
Go to first new post Buy it NOW! Special...
11-19-2008 10:30 PM
Last post by babygi9538
Today 05:03 PM
30 Replies, 364 Views
View Single Post

 
Old 04-06-2008, 01:19 AM   #10 (permalink)
second2none
Underground

Male second2none is offline
 
Join Date: Sep 2006
Location: BrisBANE <----
Age: 19
Posts: 5,025
GPoints: 321
iTrader: 1 / 100%
second2none Is a Party Captainsecond2none Is a Party Captainsecond2none Is a Party Captain
Rep Power: 16
lol just use CSS, HTML, PHP and mySQL.

I have a rating system I made ages ago when I was going to make a video site.

In the database make a table with 3 columns, VideoID, TotalR (Total Rating) & TimeR (times rated)
For a simple one, Then make a simple php page like.

PHP Code:
<?php
$videoID 
"Pron";
$database_user "user";
$database_pass "pass";
$database "Test";
$database_table "Video";
$rated $_GET['rating'];
mysql_connect("localhost"$database_user$database_pass) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
if(isset(
$_GET['rating'])){
    if(
$rated == || $rated == || $rated == || $rated == || $rated == 5){
        
$sql mysql_query("SELECT * FROM '".$database_table."' WHERE videoID = '".$videoID."'") or die(mysql_error());
        
$data mysql_fetch_array($sql);
        
$TotalR $data['TotalR'] + $rated;
        
$TimeR $data['TimeR'] + 1;
        
mysql_query("UPDATE '".$database_table."' SET TotalR = '".$TotalR."' WHERE videoID = '".$videoID."'");
        
mysql_query("UPDATE '".$database_table."' SET TimeR = '".$TimeR."' WHERE videoID = '".$videoID."'");
        echo 
"Average Rating For This Video Is ".$TotalR 5;
        echo 
"<br> This Video has been rated on ".$TimeR;
    }else{
        echo 
"Sorry That Rating is not avaiable";
    }
}
else{
    echo 
"<a href=\"page.php?rating=1\">Rating 1</a>";
    echo 
"<a href=\"page.php?rating=2\">Rating 2</a>";
    echo 
"<a href=\"page.php?rating=3\">Rating 3 </a>";
    echo 
"<a href=\"page.php?rating=4\">Rating 4</a>";
    echo 
"<a href=\"page.php?rating=5\">Rating 5</a>";
}
?>
That should work I haven't Tested it. Just change the DB details accordingly.
You can Add Pictures etc.
But I don't think you should be writing a video wiki site if you are having trouble with a rating system xD.
__________________
This is from:
Screenies Of A Mod
Code:
How did you do it? FLP , jotform, some other form of hacking? - First Class Noob
Lawl.. funny shit.

Quote:
Originally Posted by Kore
By k[ore] on Today, 08:44 AM
i'll give you rep alright, but it won't be positive.
Lawl Ownt

Hoes forgot to eat a dick and shut the FUCK UP!
  Reply With Quote
 
Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 05:25 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.12883496 seconds (100.00% PHP - 0% MySQL) with 18 queries