Jump to content

Loading includes based on menu name=""


kade119

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.