Ok , I am a total noob when it comes to php coding, I did the happy dance for about 15 minutes when I figured out how to make any name any color I wanted in the ' currently active users ' list , so is there any way to make a php code that would do this :
Quote:
(yes i know this isn't a code LOL, I'm trying to convey my idea )
$base = round(100 / $question_count);
$pct = $totalcorrect * $base;
If $pct = 100 then
$storeamount = 100 * $totalcorrect;
$updatestore = $DB_site->query("UPDATE user SET storep=storep+'$storeamount' WHERE userid='$bbuserinfo[userid]'");
else
$storeamount = 10 * $totalcorrect;
$updatestore = $DB_site->query("UPDATE user SET storep=storep+'$storeamount' WHERE userid='$bbuserinfo[userid]'");
|
See this way , if someone took a 10 question quiz and got 9 or less right , it will give 10 points per question , but if they got all 10 right and scored 100% , it would award them $1000
make any sense , sorry if it doesnt :P