Foser Posted July 3, 2007 Share Posted July 3, 2007 alright this is my script <?php include('../../config.php'); session_start(); // Authentication if ($_SESSION['LOGGEDIN'] == !TRUE){ echo "You are not logged in. Click <a href=\"../../index.php\">here</a> to login."; exit;} $result = mysql_num_rows(mysql_query("SELECT admin_rights FROM user_info WHERE username = '$_SESSION[uNAME]'")); if ($result != TRUE){ echo "You are not authorized to view the selected page."; exit;} echo "<table width=\"200\" border=\"1\">"; echo "<form name=\"form1\" method=\"post\" action=''>"; $memquery = mysql_query("SELECT username FROM user_info"); while (mysql_num_rows($memquery)){ echo "<tr>"; echo "<th scope=\"col\">{$memquery}</th>"; $user = $memquery; echo "<th scope=\"col\"><label><input type=\"submit\" name=\"edit\" id=\"edit\" value=\"Edit\"></label></th>"; echo "<th scope=\"col\"><label><input type=\"submit\" name=\"edit\" id=\"delete\" value=\"Delete\"></label></th>"; } echo "</tr></table>"; ?> I basicly want all the user info usernames and have two things saying edit or delete. but this page never loads maybe my while loop never ends? but since no error displays hard for me to see the mistake. any help would be great thanks! Quote Link to comment Share on other sites More sharing options...
DeathStar Posted July 3, 2007 Share Posted July 3, 2007 You do not have a loop in there mate. It would give an execution time error. try fixing this: if ($_SESSION['LOGGEDIN'] == !TRUE){ to: if ($_SESSION['LOGGEDIN'] !== TRUE){ Quote Link to comment Share on other sites More sharing options...
Foser Posted July 3, 2007 Author Share Posted July 3, 2007 nop still the same, i was thinking it was a problem with the loop. Quote Link to comment Share on other sites More sharing options...
Foser Posted July 3, 2007 Author Share Posted July 3, 2007 When I take away the loop it loads the page fine so it's a problem in the loop Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.