PDA

View Full Version : How do I...


appler
05-12-2005, 07:45 AM
Let me start off by saying that I have no experience with CGI. I know Javascript very well, and people have told me the two are alike, but I've never used CGI. I have a Netfirms.com domain and all I know is that there's a /cgi-bin directory that I'm supposed to use somehow... So if you could please help me out, and explain how to do it like you're talking to a 5-year-old?

I need to create a button that becomes disabled to every visitor after any one person clicks on it. It doesn't necissarily need to be a button... anything that can be disabled.

What I'm really trying to create is kind of like a competition-type thing: the first person to click on it gets the prize, anyone else gets a big goose-egg.

mlseim
05-12-2005, 01:03 PM
OK,

First of all, you should know that there are hundreds of tutorials on
the internet for beginning Perl. They all pretty much start out with the
famous "Hello World" script. It shows how to use your FTP program to
upload the script in ASCII mode (instead of Binary) ... and how to set
permissions (CHMOD) on the script. Both of those things are important
to get your scripts to run. Search Google: Perl tutorial beginner

I've used Netfirms before. They also utilize SSI (Server Side Includes).
Using SSI, along with Perl can be a great solution to your click problem.

You have to make a couple of decisions because there is more than one
way to do what you are trying to do. You can use Perl/SSI or use Perl
and Javascript together (as a graphic link .... like a hit counter thing).
Or, you could have the page displayed not as a static page, but created
dynamically using Perl. So, right there, are three totally different methods
of doing the same thing.

Each method has it's own quirks:
With SSI, the webpage ends with .shtml, instead of .html
With Javascript, some people may have it turned off.
With Dynamic Perl created page, the URL is to a Perl script.

I personally would go with the SSI method and create a new directory,
with your webpage being called: index.shtml That way, you can just call
the directory and "index.shtml" is automatically displayed ... nobody
really knows or cares that the extension is ".shtml"

Your "first to click" project could grow into something bigger, like most
projects end up. It may end up with a database, multiple users, keeping
track of the winner, switching graphic images (that are the links) ... etc.

It may be a rather complex project for a "Perl" beginner ... but you sound
like you might be interested in learning Perl.

Learn the basics first ... upload a simple script, CHMOD the permissions,
get it to work and then let us know when you're ready to do some more.



.