"; $loaderror = true; } else { $test = mysql_query("SELECT * FROM reviewratings WHERE (trackid = $id) && (useremail = \"$_SESSION[username]\")"); if(mysql_numrows($test) > 0) { $errorstring .= "You have already rated this track
"; $loaderror = true; } } /* Load track genre */ $loadtrack = mysql_query("SELECT * FROM tracks WHERE id = $id"); $genreid = mysql_result($loadtrack, 0, genreID); $test = mysql_query("SELECT * FROM genres WHERE id = $genreid"); $siteGenre = mysql_result($test, 0, filename_prefix); if($loaderror == true) { include("header.php"); echo "

"; outputErrors($errorstring); include("footer.php"); exit; } $artistname = mysql_result($loadtrack, 0, artist); $trackname = mysql_result($loadtrack, 0, title); $pagetitle = "Rate Track"; $titleImage = "whatdoyouthink.gif"; /* Form Submitted, Do Something Gnarly */ if($submit == true) { $errorstring == ""; if(($rating != 1) && ($rating != 2) && ($rating != 3) && ($rating != 4) && ($rating != 5)) $errorstring .= "Please rate the track from 1 to 5 stars!
"; $comments = formatField($comments); $comments = strip_tags($comments); $comments = str_replace("\n", " ", $comments); if(strlen($comments) > 256) $errorstring .= "Please keep your comments short - maximum of 256 characters
"; if(strlen($errorstring) == 0) { $temp = mysql_query("INSERT INTO reviewratings (trackid, useremail, rating) VALUES ($id, \"$_SESSION[username]\", $rating)"); if(strlen($comments) > 1) $temp = mysql_query("INSERT INTO reviewcomments (trackid, useremail, comment) VALUES ($id, \"$_SESSION[username]\", \"$comments\")"); $done = 1; } } include("header.php"); ?>

return to track info page"; else { ?> Tell us what you think of :

"; outputErrors($errorstring); } ?>


Your Rating: >  
>  
>  
>  
>  

Your Comments: (optional)