in reply to Can Perl create its own searchable db?
If your host is a UNIX-based server, then you can use the Berkely-style database that's inherent to the system. DBD::File is where you want to go, as referenced above.
Since you're just storing records in a flat table (I'm assuming you don't want a lot of tables - Database guys love them, but unless you're comfortable with DB normalization, I'd stick with a flat table. - http://www.devshed.com has a good lesson on database structure, but their website is broken ATM and I can't get you a direct link.The other possibility is to just write all your fields to a delimited text file. Just append to the file every time the form is submitted, and then you can open your datafile up in a spreadsheet and sort to your heart's content.
Here's a tweakable example. I fully admit that this code can be optimized and it *will* have to be edited for your form. I'm doing this on purpose wo you learn how it works better. =)
I'd also spit them out a second page saying thanks for filling out your 100-field form. One possible easy way is HTML::Template. Hope this helps.use CGI; $outputString = param('formfield1') . "|" . param('formfield2'); open OUTPUTFILE, "filename.txt"; print OUTPUTFILE $outputString . "\n";
UPDATE: Corrected bad CPAN Link
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Yes... sort of.
by Elliott (Pilgrim) on Jan 11, 2003 at 01:02 UTC | |
Re: Yes... sort of.
by Bismark (Scribe) on Jan 10, 2003 at 18:59 UTC | |
by khudgins (Sexton) on Jan 10, 2003 at 21:19 UTC |