Fog Creek Software
Discussion Board




What's a simple CGI example to code?

I want to show someone how to accept POST parameters in their perl script, and produce a dynamically generated HTML page.  I can't think of a decent idea, besides

print "Hello" & parms(firstName)
or
print "the sum of the numbers is: " & parms(val1) + parms(val2)

Thanks for any ideas that are a little more interesting (yet basically as simple)

*Null
Thursday, June 03, 2004

- Stock Quotes
- Book price by ISBN
- Sports statistics by year or team or whatever
- Calculator (duh!, worst than HelloWorld)
- Search results by keyword
- ...

You should look for simple WebServices examples and steal ideas, after all CGIs were the original web services.

.NET Developer
Thursday, June 03, 2004

Most useful or interesting stuff will obviously involve communicating with some other system or datasource (web service, RDBMS, file store, directory server...)

Aside from that...how about a mad lib?  Anyone remember those from the 80's? hehe

Joe
Thursday, June 03, 2004

In the 80's I didn't have color television.

RP
Friday, June 04, 2004

You could have a look at this site - a good introduction to sound CGI programming practices:

http://users.easystreet.com/ovid/cgi_course/

Ken Ray
Friday, June 04, 2004

What .... CGI .... please.  I think you ought to find someone to show you a framework. Believe me ... if you are going to build anything that goes anywhere you will want a framework otherwise just use formmail.pl but get the secure version.

slackerssuck
Saturday, June 05, 2004

*  Recent Topics

*  Fog Creek Home