} } catch (Exception $e) { $_SESSION['WELL_DONE'] = $e->getMessage(); } header('Location: /question?q=' . $qid); } } elseif (!isset($_GET['q'])) { include_once "content.inc"; } else { $qid = intval($_GET['q']); if ($qid <= 0 || $qid >= 65535) { header("Location: /challenges.php"); } include_once "includes/puzzle.php"; $qObj = new question(); $result = $qObj->get_question_details($qid); if (count($result) != 0) { if (isset($_SESSION['WELL_DONE']) && $_SESSION['WELL_DONE'] != "") { ?> <h2><font color="green"><?php echo $_SESSION['WELL_DONE']; $_SESSION['WELL_DONE'] = ""; ?> </font></h2> <?php } else { ?> <p> </p> <?php } ?>