sorry assassin, that was experimental code, heres what i was doing properly
PHP Code:
case "voting":
// this conditional handles the rating
if ('confess_rate' && $rate && $confessionid != '' && $bbuserinfo[userid] > 0) {
$flood = $DB_site->query("SELECT timestamp FROM confessions ORDER BY timestamp DESC LIMIT 1");
$check = $DB_site->fetch_array($flood);
if ((time() - $check[timestamp]) <= 10) {
eval("standarderror(\"".gettemplate("confession_error_vote")."\");");
}
if ($bbuserinfo[userid] == $DB_site->query("SELECT userid FROM confession_rate WHERE confessionid = $confessionid")) {
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=");
} else {
header("Location: $PHP_SELF?s=");
}
break;
but i'll try the using the super globals
ps. this is just the form processing, the actual form display elsewhere in the document.
heres the link to where this is all happening
http://www.ebslive.com/confessions/i...onfessionid=49