$gscore = 4; $hscore = 3; $rscore = 2; $sscore = 1; if ($answer == $ganswer){ $score = $gscore; } elseif ($answer == $sanswer){ $score = $sscore; } elseif ($answer == $hanswer){ $score = $hscore; } else { $score = $rscore; } if ($bbuserinfo['usergroupid'] == 2){ $DB_site->query("UPDATE user SET question1 = '" .$theqid ."', score1 = '" .$score ."' WHERE userid = '" .$bbuserinfo[userid]."'"); }
echo $score;
$gscore = 4; $hscore = 3; $rscore = 2; $sscore = 1; if ($answer == $ganswer){ $score = $gscore; } elseif ($answer == $sanswer){ $score = $sscore; } elseif ($answer == $hanswer){ $score = $hscore; } else { $score = $rscore; } echo $score; if ($bbuserinfo['usergroupid'] == 2){ $DB_site->query("UPDATE user SET question1 = '" .$theqid ."', score1 = '" .$score ."' WHERE userid = '" .$bbuserinfo[userid]."'"); }