kade119 Posted April 22, 2010 Share Posted April 22, 2010 Let me tell you what i'm trying to accomplish: I want a way to play a flash mp3 player that will not start over each time a new page loads, so i thought i could have php includes swap each time i click on a new menu item that way my page doesn't refresh... would this be an appropriate way of achieve this? please know im new to PHP and found the below script --Thanks <? if ($_GET['part'] == 'page1.php') include('page1.php'); elseif ($_GET['part'] == 'page2.php') include('page2.php'); elseif ($_GET['part'] == 'page3.php') include('page3.php'); ?> [code=php:0] <a href="index.php?part=page1.php">Page 1</a> <a href="index.php?part=page2.php">Page 2</a> <a href="index.php?part=page3.php">Page 3</a> [/code] Link to comment https://forums.phpfreaks.com/topic/199394-loading-includes-based-on-menu-name/ Share on other sites More sharing options...
JAY6390 Posted April 22, 2010 Share Posted April 22, 2010 AJAX would solve this. Other than that, you cannot do it without a page refresh Link to comment https://forums.phpfreaks.com/topic/199394-loading-includes-based-on-menu-name/#findComment-1046456 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.