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! Link to comment https://forums.phpfreaks.com/topic/58232-solved-never-loading-script/ 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){ Link to comment https://forums.phpfreaks.com/topic/58232-solved-never-loading-script/#findComment-288724 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. Link to comment https://forums.phpfreaks.com/topic/58232-solved-never-loading-script/#findComment-288731 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 Link to comment https://forums.phpfreaks.com/topic/58232-solved-never-loading-script/#findComment-288738 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.