Alright im making a php script that is included at the bottom of each page of a site, and at the bottom it will show a link saying "No Media Selected" and if you click it, it will refresh the page and instead have a link to a certain MIDI track that will start playing (eg. FFX - Other World). You can then click it again to turn off the music.
The trick of it is, the music that is played is determined on the page that your viewing, so in my case its a Final Fantasy gaming site, so if you were looking at the page about Chocobos, Chocobo music will play, if you are looking at a page for Items, shop music will play.
to get this to work I need to develop a method that the page viewed is somehow translated into a variable and then I can make if statements
(eg. http://www.ffextreme.com/chocobo.php
I need it so the script takes the "chocobo" and applies it to the script, so then I can have
if (blah blah == chocobo) {
display this link and play this
}
anyone know how I can do this? or has any better ideas than mine on how I could go about doing this?