got the code down from 25 lines to 17 but it's still not working, i think this is down to the actual form rather than the coding tho.
PHP Code:
// this conditional handles the rating
if ($_POST['submit'] == 'confess_rate') {
$confessionid = intval($_POST['confessionid']);
$verify = $DB_site->query_first("SELECT userid FROM confession_rate WHERE confessionid = $confessionid AND userid = $bbuserinfo[userid]");
if ($verify) {
eval("standarderror(\"".gettemplate("confession_error_novotetwice")."\");");
} else {
$DB_site->query("INSERT INTO confession_rate SET
confessionid = '$confessionid',
userid = '$bbuserinfo[userid]',
rate = '$rate',
timestamp = '".time ()."'");
header("Location: $PHP_SELF?s="); //takes you back to main confession page
}
} else {
eval("standarderror(\"".gettemplate("confession_error_vote")."\");");
}