Server side include help

miatthas

New Member
Hi, I have a couple server side include questions:

I have a file on my webserver: http://everettworks.com/music/scoreplayer.shtm. Here are some lines from the document, and what they have in them:

Line 27: <title>Teacher Tribute</title>
Line 111: <h1>Teacher Tribute</h1>
Line 122: <embed src="Teacher Tribute.sco"

I've heard with server side includes you can make the page:

Line 27: <title>___</title>
Line 111: <h1>___</h1>
Line 122: <embed src="___.sco"

Then if I visit everettworks.com/music/scoreplayer.shtm?Teacher Tribute, then somehow, the blanks will be filled in with "Teacher Tribute".

I know this can be done because of this website: http://www.classicalmidiconnection.com/midiplay/playmidi.shtml?midi/a1/bumble_r. The source code of the site is confusing, so I can't figure out how they did it. If anyone know how this can be achieved in any way, I'd appreciate if the said something, and I thank them in advance.

Basically, what I want is to have one file, and change the URL, instead of creating a new html file for each .sco file. Thank you very much.
 

n1c0_ds

New Member
You can use PHP $_GET for what you are looking for but you'll need to have .php file extentions.

Check it out HERE

That's pretty much what you are looking for. However, make sure you use htmlspecialchars to escape output. Otherwise someone could enter malicious code as the username and send the address to innocent visitors.
 
Top