having trouble getting this to work! it is a ranking system but there is an error, check out the page here...
http://harborcityrecords.com/viraldorks.com/rating/rate.php
</php
ob_start();
include 'connect.php';
$id = $_GET['id'];
// process submission
if ($_POST ['submit'])
{
//get data
$id_post = $_POST['id'];
$rating_post = $_POST['rating'];
if ($rating_post >= 5&&$rating_post !>0)
{
$get = mysql_query ("SELECT * FROM videoinfo WHERE id='$id_post'");
$get = mysql_fetch_assoc($get);
$get = $get['rating'];
if ($get==0)
$newrating = $get + $rating_post;
else
$newrating = ($get + $rating_post)/2;
$update = mysql_query("UPDATE videoinfo SET rating='$newrating' WHERE id='$id_post'");
}
header ("Location: index.php");
}
?>
<form action="rate.php" method="post">
Choose rating:<br/>
<select name="rating">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
<input type="hidden" name="id" value="<?php echo $id; ?>">
<p />
<input type="submit" name="submit" value="Rate!">
</form>