|
-
Dec 11th, 2000, 03:00 PM
#1
Thread Starter
New Member
I have a cgi script that basically writes an entire web page. Actually, it writes the common parts of the webpage, so it's basically a template. In the middle of it, where the actual content goes, there is a line that pulls in the content from a separate file. It is a require statement, and requires a .pl file. So, for example, I would have a reviews page, called review.cgi, with a require line like require "reviews.pl";, or a links page like links.cgi with a require line like require "link.pl";.
The thing is, those cgi files, like reviews.cgi and links.cgi, are all exactly identical, except for the require line. I'm thinking there must be a better way to do it.
I think that there is a way to use a URL to pass a variable into as script. I think it is something like http://www.websiteurl.com/file.cgi?variablename=variablevalue. But I don't know exactly how it works.
So, how do I do that? I would probably call the variable 'file', and the cgi file would be named main.cgi. What do I have to do to the cgi file so that it gets the variable from the URL that somebody used to open the file, and get it to work in the require line?
Thanks in advance for any help!
-Justin J. "JJR512" Rebbert
If it's not broke, you're not trying hard enough!
Please visit JJR512.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|