<input type="text" name="ban_reason" value="" /> <br /> <input style="margin-left: 115px;" type="submit" value="Add Ban" /> </form> <?php } } elseif ($_GET['do'] == 'edit-ban') { echo '<p>On this page you can edit the current bans.</p>'; if ($_SERVER['REQUEST_METHOD'] == "POST") { $fails = 0; $i = 0; while (count($_POST['ban_id']) > $i) { //echo "\n ID: " . $_POST['announcement_id'][$i] . "\nTYPE: " .$_POST['announcement_type'][$i] . "\n TEXT: " . $_POST['announcement_text'][$i++] . "\n"; if (!$ban->updateBan($_POST['ban_id'][$i], $_POST['ban_ip'][$i], $_POST['ban_reason'][$i++])) { $fails++; } } if ($fails == 0) { echo '<p class="notification green">You have successfully updated the bans.</p>'; $log->addLog($_SESSION['loggedIn']['id'], "Updated bans."); $hideForm = true; } else { echo '<p class="notification red">Something went wrong while updating the bans.</p>'; } } if ($hideForm !== true) { ?> <form action="" method="post" class="styled"> <table width="100%">