Filling in an online form.
Greetings;
I want to setup a form on a web page that a visitor can fill
in then send it back to me by email so I can browse it
online and print it out locally in the correct format. I
have the way to define the input form figured out, but the
transmission and browsing and printing the form are giving
me trouble, to say the least!
My public web server (Apache) is not local. I have a local
Apache2 web server that I use for testing.
Can anybody point me to a tutorial or example of how to do
this? (Using perl, of course!)
Many TIA!
Dennis
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: Filling in an online form.
> I want to setup a form on a web page that a visitor can fill in then
> send it back to me by email so I can browse it online and print it out
> locally in the correct format. I have the way to define the input form
> figured out, but the transmission and browsing and printing the form are
> giving me trouble, to say the least!
>
> My public web server (Apache) is not local. I have a local Apache2 web
> server that I use for testing.
>
> Can anybody point me to a tutorial or example of how to do this? (Using
> perl, of course!)
There is a simple but valuable book you might want to read for the full
story, CGI programming with Perl:
http://oreilly.com/catalog/9781565924192
--
terry - terry [at] geekmail.de
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: Filling in an online form.
Dennis Wicks wrote:
> Greetings;
>
> I want to setup a form on a web page that a visitor can fill in then
> send it back to me by email so I can browse it online and print it out
> locally in the correct format. I have the way to define the input form
> figured out, but the transmission and browsing and printing the form
> are giving me trouble, to say the least!
>
> My public web server (Apache) is not local. I have a local Apache2 web
> server that I use for testing.
>
> Can anybody point me to a tutorial or example of how to do this?
> (Using perl, of course!)
>
> Many TIA!
> Dennis
>
I'm pretty new to Perl, but I'll try to tackle this one with what I know
so far....
First of all, I'm not sure about what you mean by "browse it online"; do
you want to store the content in a database? From my perspective your
question seems vague. You'll have to define that more precisely...
For the first half of your problem that I think I understand, I'll
assume you need information on using CGI coupled with sending e-mail. I
recently learned some of the basics of using Perl with the web through
Chapter 14 - Introduction to CGI, of "Beginning Perl", (3rd Ed.) by
James Lee. It's not complete (for example, lacks security
considerations), but the chapter reads like a tutorial and I found it
easy to follow along and build the example script at the end of the
chapter (webchess.pl). The book also refers the reader to "Official
Guide to Programming with CGI.pm" by Lincoln Stein (the module's author).
For "official" PerlDoc online documentation with an example, check out:
http://perldoc.perl.org/CGI.html#A-COMPLETE-EXAMPLE-OF-A-SIM PLE-FORM-BASED-SCRIPT
Working with the example above, the do_work() subroutine processes the
form parameters. You should be able to apply the same concept to your
problem, and have do_work() grab the posted data ( via the keys in the
param() method ) and output to an e-mail, using the Mail::Mailer module:
http://perldoc.perl.org/perlfaq9.html#How-do-I-send-mail?
http://search.cpan.org/~markov/MailTools-2.07/lib/Mail/Maile r.pod
Hope that gets you a start.
Brian
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: Filling in an online form.
http://perlmeme.org/tutorials/cgi_form.html
I don't know of your skills with perl, but I think you might find
these tutorial useful; however, be aware of the security risks with
the flaws of bad code and usage of perl CGI. This should be for a
starter project, then refine the project for a production environment.
On Mon, Mar 28, 2011 at 5:23 PM, Dennis Wicks <dgwicks [at] gmail.com> wrote:
> Greetings;
>
> I want to setup a form on a web page that a visitor can fill in then send it
> back to me by email so I can browse it online and print it out locally in
> the correct format. I have the way to define the input form figured out, but
> the transmission and browsing and printing the form are giving me trouble,
> to say the least!
>
> My public web server (Apache) is not local. I have a local Apache2 web
> server that I use for testing.
>
> Can anybody point me to a tutorial or example of how to do this? (Using
> perl, of course!)
>
> Many TIA!
> Dennis
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
> For additional commands, e-mail: beginners-help [at] perl.org
> http://learn.perl.org/
>
>
>
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Re: Filling in an online form.
Hi Dennis,
On Tuesday 29 Mar 2011 02:23:31 Dennis Wicks wrote:
> Greetings;
>
> I want to setup a form on a web page that a visitor can fill
> in then send it back to me by email so I can browse it
> online and print it out locally in the correct format. I
> have the way to define the input form figured out, but the
> transmission and browsing and printing the form are giving
> me trouble, to say the least!
>
> My public web server (Apache) is not local. I have a local
> Apache2 web server that I use for testing.
>
> Can anybody point me to a tutorial or example of how to do
> this? (Using perl, of course!)
>
in addition to what the other people said here, see the
http://perl-begin.org/ resources for web-development:
http://perl-begin.org/uses/web/
I mention there Ovid's CGI course as well as Plack/PSGI (though I was told you
can use a CGI.pm-like interface for it too now) and that you should not use
Plack directly.
Sawyer also gave a talk about web-devel in Perl to http://telaviv.pm.org/ but
I cannot find the slides or notes online.
Regards,
Shlomi Fish
--
------------------------------------------------------------ -----
Shlomi Fish http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy
Wikipedia has a page about everything including the
http://en.wikipedia.org/wiki/Kitchen_sink .
Please reply to list if it's a mailing list post - http://shlom.in/reply .
--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/