seany123 Posted March 5, 2009 Share Posted March 5, 2009 okay i have a page which worked fine but then i added a line of code for security and now when i go to view the page its just a blank white page... the code i added is: if($player['staff'] <= 2) { header("Location: home.php"); } else { and this is the page with the code added: <?php include("lib.php"); define("PAGENAME", "Bug List"); $player = check_user($secret_key, $db); include("templates/private_header.php"); if($player['staff'] <= 2) { header("Location: home.php"); } else { if (isset($_GET['fixed'])) { $query = $db->execute("select * from `bugs` where status='Fixed'"); while ($buglist= $query->fetchrow()) { $idstr = $buglist['id'] . ""; $usernamestr = $buglist['username'] . ""; $messagestr = $buglist['comment'] . ""; $statusstr = "<font color=green>" . $buglist['status'] . "</color>"; echo "<table>"; echo "<tr><td><b>Bug ID: </b>$idstr</td></tr>"; echo "<tr><td><b>Username: </b>$usernamestr</td></tr>"; echo "<tr><td><b>Bug Report: </b>$messagestr</td></tr>"; echo "<tr><td><b>Status: </b>$statusstr</td></tr>"; echo "</table><p />"; } } if (isset($_GET['pending'])) { $query = $db->execute("select * from `bugs` where status='Pending'"); while ($buglist = $query->fetchrow()) { $idstr = $buglist['id'] . ""; $usernamestr = $buglist['username'] . ""; $messagestr = $buglist['comment'] . ""; $statusstr = "<font color=red>" . $buglist['status'] . "</color>"; echo "<table>"; echo "<tr><td><b>Bug ID: </b>$idstr</td></tr>"; echo "<tr><td><b>Username: </b>$usernamestr</td></tr>"; echo "<tr><td><b>Bug Report: </b>$messagestr</td></tr>"; echo "<tr><td><b>Status: </b>$statusstr</td></tr>"; echo "</table><p />"; } } ?> <center> <form method="GET" action="bugslist.php"> <input type="submit" name="fixed" value="Fixed Bugs"> <input type="submit" name="pending" value="Pending Bugs"> <p /><b>Select which type of bugs you would like to check.</b><p /> </center> <?php include("templates/private_footer.php") ?> Link to comment https://forums.phpfreaks.com/topic/148162-solved-problem-after-adding-code/ Share on other sites More sharing options...
seany123 Posted March 5, 2009 Author Share Posted March 5, 2009 Fixed haha i forgot to add the } at the end of the page. Link to comment https://forums.phpfreaks.com/topic/148162-solved-problem-after-adding-code/#findComment-777747 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.