echo '>Edit FAQ</a></li>'; echo '<li><a href="?page=' . $_GET['page'] . '&action=' . $_GET['action'] . '&do=delete-faq"'; if ($_GET['do'] == 'delete-faq') { echo ' class="current"'; } echo '>Delete FAQ</a></li>'; echo '</ul>'; echo '</div> <div style="float: right; width: 750px;">'; if ($_GET['do'] == 'add-faq' || empty($_GET['do'])) { ?> <p>You can add a frequently asked question here.</p> <?php if ($_SERVER['REQUEST_METHOD'] == "POST") { if (!empty($_POST['faq_question']) && !empty($_POST['faq_answer'])) { if ($faq->addFAQ($_POST['faq_question'], $_POST['faq_answer'])) { echo '<p class="notification green">You have successfully added a new frequently asked question.</p>'; $log->addLog($_SESSION['loggedIn']['id'], "Added a new frequently asked question."); $hideform = true; } else { echo '<p class="notification red">Something went wrong while adding the new FAQ. Please try again.</p>'; } } else { echo '<p class="notification red">Please fill in all the fields.</p>'; } } if ($hideform !== true) { ?> <form action="" method="post" class="styled"> <label style="width: 100px;">Question</label>