erezki Posted October 23, 2007 Share Posted October 23, 2007 Hey, I built a site in PHP. All the site is working with the same URL, which is rachelkinarti.com. My paging is done with forms that sends the submit info to the same index.php script. The problem is that every time a user is changing the page (via the main menu or other ways), all the page is refreshed (dissapear for a while and appears again with the new page), even though most of the page is unchanged. Does anybody know what can cause that problem (maybe caching issues?) and how can I solve it? Thanks in advance, Erez Quote Link to comment https://forums.phpfreaks.com/topic/74439-how-to-prevent-a-whole-page-refresh/ Share on other sites More sharing options...
LemonInflux Posted October 23, 2007 Share Posted October 23, 2007 the browser obviously has to reload the new page. What you could do, is in the middle area (The content area), put a switch code. However, this would mean your URL would be http://rachelkinarti.com/?page1 <?php switch($_SERVER['QUERY_STRING']) { // For each page you want, put a block like this case 'page1': // Whatever you want after the /? include('pages/page1.php'); // The page to include break; // And, the default page... default: include('pages/main.inc'); // Home Page include } ?> Quote Link to comment https://forums.phpfreaks.com/topic/74439-how-to-prevent-a-whole-page-refresh/#findComment-376083 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.