in reply to Form to let web user input their own data to another page

If this form's data is to be used only on the next page, and not in the future, then CGI.pm is all you will probably need.

If, however, you intend this data to be used for more than just one post to a page, you will need to look into a method of saving the data to a file or database, and then reading it back.

CGI.pm will do the saving to a FILEHANDLE for you, but designing a good text or relational database would probably be a better way to go.

For TEXT database use, from what I have seen here, Text::CSV and Text::xSV seem to be the modules of choice.

For RELATIONAL database use, DBI.pm is what I use with a MySQL database on Linux.

So, those modules, combined with what you find here on PerlMonks will get you there. Good Luck!

  • Comment on Re: Form to let web user input their own data to another page

Replies are listed 'Best First'.
Re: Re: Form to let web user input their own data to another page
by murphya (Sexton) on Apr 22, 2001 at 03:51 UTC
    The best source of CGI info is on the perl.com website- follow the "How do I write CGI scripts?" link. As usual the best way to learn is to practice a few scripts.

    Also, if you are entering a lot of data you might want to include some simple javascript to check the information before sending to the server. I have found this to be a useful tool. There is tonnes of info for this on the web and will make the CGI stuff simpler, since you know exactly what ranges of values you will be receiving.

    It seems much more difficult than it actually is! Good Luck.

      JavaScript validation can help tremendously. Just don't rely on it.
      The reason being that folks can turn off JavaScript in their browsers. This will allow the form to be posted without the JavaScript validation.

      Hence you'll still need to do some field validation as the cgi script accepts the data.
      Claude