From: Thomas Adam Date: 2004-01-17T14:05:41+09:00 Subject: Re: mod_ruby, cgi, forms .... --- Ruby Tuesday wrote: > I'm trying to create a simple form with with name, address, phone_number > > using mod_ruby/eruby/cgi whatever is easier. > > I can create an html form(s) but I can somehow create a cgi script to > capture the name,address,phone number --- store it(mysql, file), and > display it back. > > Perhaps anyone can give me an example on how to do that. My goal is to > add picture as well beside the name, address and phone number. Assuming you give your fields in your form names, you can do (within your script): require 'cgi' cgi = CGI.new cgi['name'] # -> ["Thomas Adam"] cgi['bday'] # -> ["1983"] Which when passed via the CGI script will display the results above assuming you hand enty names for your fields with 'name' and 'bday' -- Thomas Adam ===== "The Linux Weekend Mechanic" -- http://linuxgazette.net "TAG Editor" -- http://linuxgazette.net " We'll just save up your sins, Thomas, and punish you for all of them at once when you get better. The experience will probably kill you. :)" -- Benjamin A. Okopnik (Linux Gazette Technical Editor) ________________________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html