
How do I get a CGI form to work?
A reader writers:
"I'm trying to create a guestbook using the forms and CGI's, but I'm stuck as to how to link the form to the server. The sign page is at <guestadd.html> and I would like the view page to be at <guestbook.html>. What I did was use a somewhat template form of guestbook provided by our web host, and, after editing the sign page (new additions are "Current Division" and "Mu Alpha Theta Chapter"), wanted the additions to appear on guestbook.html, but I don't know how to do that..." In terms of view page link, more likely than not it'll be a .cgi URL not a .html URL as you indicate in your message: what's their recommended link for allowing someone to just see the guestbook without adding a new entry? Still have questions? Come back and post a Q&A and we can discuss this further!
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.
Categorized:
CGI Scripts and Web Site Programming
(Article 3651)
Tagged: Previous: Changes and updates to "Learning Unix for Mac OS X"? Next: How much should I charge to build a Web site? Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader. An additional note: All HTML pages are fundamentally static: you create the page you want, you preview it in your browser, and you're good to go. It's uploaded to your server and it's done. With CGI, however, everything's different. A CGI-based page is generated on-the-fly as the output of a program that's run on your server. That means that for a guestboook to work, you need to have a cgi program that can accept the guestbook data, do something with it (probably write it to a file or insert it into a database) and output a meaningful result (probably a 'thanks for submitting your comments' message). Typically, you'd have a static HTML page that asks for entries (a form, built within the <form> tag pair) which feeds its data to your add-guestbook-entry CGI script. That script then either outputs the existing guestbook as a nice HTML page, or outputs a 'thank you'. Then you need a second script (or the same script with enough smarts to see if there's a new entry or just a display request) that outputs the guestbook data. This is pretty complex just writing about it here, so here's a good tutorial by Joel Burns with extensive example listings. Posted by: Dave Taylor at June 29, 2003 7:52 AMYou have done an exceptional job in creating and designing this website. My Congratulations to you!!! Posted by: junw at March 1, 2004 3:51 AMI have a lot to say, but ...
I do have a comment, now that you mention it!
|
Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Join the List!
Book Links
|