$email)); }else{ $row = mysql_fetch_array($result); $cur_user_id = $row['id']; } #echo $cur_user_id; $sql = "SELECT * FROM quiz ORDER BY RAND() LIMIT 0,".MAX_Q; $result = dbquery($sql, $connid, __FILE__, __LINE__); $q_count = mysql_num_rows($result); if($q_count > 0 ){ $session_key = SES_KEY; $_SESSION[$session_key]['SESSION_ID'] = time().getrand(); $_SESSION[$session_key]['QTOT'] = MIN(MAX_Q, $q_count); $_SESSION[$session_key]['QLAST_ATT'] = 0; $_SESSION[$session_key]['DONE'] = false; $_SESSION[$session_key]['USER_ID'] = $cur_user_id; $_SESSION[$session_key]['TOT_CORRECT_ANS'] = 0; $_SESSION[$session_key]['QA'] = array(); $_SESSION[$session_key]['SHOWN_ANS'] = array(); $cnt_sql = "SELECT count(*) as cnt FROM quiz"; $cnt_result = dbquery($cnt_sql, $connid, __FILE__, __LINE__); $cnt_row = mysql_fetch_array($cnt_result); $_SESSION[$session_key]['QCOUNT'] = $cnt_row['cnt']; while($row = mysql_fetch_array($result)){ $dm = trim($row['dm']); @list($day, $month) = explode('-', $dm); $dm = "$month - $day"; $q_prefix = ""; $q_suffix = ". What day does this holiday occur each year"; $quest = replace_accents(rtrim(trim($row['event']), ".")); $quest = $q_prefix.$quest.$q_suffix; $_SESSION[$session_key]['QA'][] = array('Q' => $quest, 'O' => array($dm), 'AI' => -1, 'AT' => $dm, 'id' => $row['id']); } $score_id = add_score(array('user_id' => $cur_user_id, 'session_id' => $_SESSION[$session_key]['SESSION_ID'], 'total_q' => $_SESSION[$session_key]['QTOT'])); $_SESSION[$session_key]['SCORE_ID'] = $score_id ; header('Location: trivia.php?n=1'); exit; }else{ $err = 'No questions found'; } } }else if(is_valid_session() && isset($_POST['try_more'])){ $sql = "SELECT * FROM quiz ORDER BY RAND() LIMIT 0,".MAX_Q; $result = dbquery($sql, $connid, __FILE__, __LINE__); $q_count = mysql_num_rows($result); if($q_count > 0 ){ $session_key = SES_KEY; $cur_user_id = $_SESSION[$session_key]['USER_ID']; $_SESSION[$session_key]['SESSION_ID'] = time().getrand(); $_SESSION[$session_key]['QTOT'] = MIN(MAX_Q, $q_count); $_SESSION[$session_key]['QLAST_ATT'] = 0; $_SESSION[$session_key]['DONE'] = false; $_SESSION[$session_key]['TOT_CORRECT_ANS'] = 0; $_SESSION[$session_key]['QA'] = array(); while($row = mysql_fetch_array($result)){ $dm = trim($row['dm']); @list($day, $month) = explode('-', $dm); $dm = "$month - $day"; $q_prefix = ""; $q_suffix = ". What day does this holiday occur each year"; $quest = replace_accents(rtrim(trim($row['event']), ".")); $quest = $q_prefix.$quest.$q_suffix; $_SESSION[$session_key]['QA'][] = array('Q' => $quest, 'O' => array($dm), 'AI' => -1, 'AT' => $dm, 'id' => $row['id']); } $score_id = add_score(array('user_id' => $cur_user_id, 'session_id' => $_SESSION[$session_key]['SESSION_ID'], 'total_q' => $_SESSION[$session_key]['QTOT'])); $_SESSION[$session_key]['SCORE_ID'] = $score_id ; header('Location: trivia.php?n=1'); exit; }else{ $err = 'No questions found'; } } ?>




Play our Holidays Trivia Quiz

  Take the free challenge and try to correctly answer 8 Holiday Questions.

  Play as many times as you want - and with a database of hundreds of questions - each game will offer new challenges.


To get started, simply enter your email address below.*


    
*You will be subscribed to the free Famous Daily email.
Your privacy is protected and you can unsubscribe at any time.