Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-04-2011, 02:48 AM   #1
New Member
 
Join Date: Dec 2011
Posts: 3
Default Server side include help

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.c...di/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.
miatthas is offline   Reply With Quote


Old 12-04-2011, 07:45 AM   #2
Gold Member
 
Join Date: Feb 2011
Location: Australia
Posts: 369
Default

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

Check it out HERE
__________________
Jason H.
DHDdirect.com
Domains - Hosting - Design
DHDdirect is offline   Reply With Quote
Old 12-05-2011, 03:46 PM   #3
Bronze Member
 
n1c0_ds's Avatar
 
Join Date: Nov 2009
Location: Granby, Québec
Posts: 55
Send a message via Skype™ to n1c0_ds
Default

Quote:
Originally Posted by DHDdirect View Post
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.
__________________
Nicolas Bouliane
Web designer/developer in Granby, Québec
n1c0_ds is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:23 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.