bobohob Posted March 5, 2008 Share Posted March 5, 2008 Why does my php page stop loading before it reach 100% ? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/94416-page-time-out/ Share on other sites More sharing options...
priti Posted March 5, 2008 Share Posted March 5, 2008 There could be n reason for it without knowing what you are trying to do how one can help you in this.Guess could be ...... you might have used die,exists in your code. or you content is too big to get in to one page so it hangs .... once you will tell us what hte problem people here will help you more. regards Quote Link to comment https://forums.phpfreaks.com/topic/94416-page-time-out/#findComment-483567 Share on other sites More sharing options...
bobohob Posted March 5, 2008 Author Share Posted March 5, 2008 Thanks for responding. The strange thing is it doesn't always hang. It happens on Mozilla browser, not on Opera. and yes, I use die but with a message. I don't use exists. And the content is very possibly too big to get in one page. Quote Link to comment https://forums.phpfreaks.com/topic/94416-page-time-out/#findComment-483579 Share on other sites More sharing options...
black_box Posted March 5, 2008 Share Posted March 5, 2008 if those data is too big use Pegination: It will show data Page by Page <?php // Connects to your Database mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()); mysql_select_db("address") or die(mysql_error()); //This checks to see if there is a page number. If not, it will set it to page 1 if (!(isset($pagenum))) { $pagenum = 1; } //Here we count the number of results //Edit $data to be your query $data = mysql_query("SELECT * FROM topsites") or die(mysql_error()); $rows = mysql_num_rows($data); //This is the number of results displayed per page $page_rows = 4; //This tells us the page number of our last page $last = ceil($rows/$page_rows); //this makes sure the page number isn't below one, or more than our maximum pages if ($pagenum < 1) { $pagenum = 1; } elseif ($pagenum > $last) { $pagenum = $last; } //This sets the range to display in our query $max = 'limit ' .($pagenum - 1) * $page_rows .',' .$page_rows; Quote Link to comment https://forums.phpfreaks.com/topic/94416-page-time-out/#findComment-483582 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.