I tried to view the perl demo at the link you provided in your email http://www.pcug.org.au/~rcook/tute.cgi and WAS unable to GET TO THE DEMO to view it.
I'm not quite clear on exactly what the sample code does at this point being a newbie but what I'm understanding, I don't need to write a new complete perl script but just need to edit the existing script deleting a portion of it and inserting some new code into the script. Do I have that correct? At this point, I believe what the objective of the new bit of code is to accomplish is to display the web form within the script and process the information that the user provides. Do I still need to use the original html form that I created and if so, do I have to pull the form into the script? It would be helpful if I could get to the demo and view a sample. Thanks. ----- Original Message ----- From: "Owen Cook" <[EMAIL PROTECTED]> To: "David Swiderski" <[EMAIL PROTECTED]> Cc: <beginners@perl.org> Sent: Sunday, September 18, 2005 1:05 AM Subject: Re: displaying a message using perl code perl script email.pl #!/usr/bin/perl <snip> # Gets the data from the form &parse_form; Wow OK, looks like you are using a script written in the early 90s. What you have is a html page that has a form and and action script, email.html. What you want is as I described before, a script that 1. produces the form 2. processes the form What you have now wont do that. Something like this(demo at http://www.pcug.org.au/~rcook/tute.cgi) #!/usr/bin/perl use strict; use CGI; my $form = new CGI; print $form->header("text/html"); print $form->start_html(-title => 'Blah Blah'); my $name = $form->param("name")||''; my $email = $form->param("email")||''; show_form() if ($email eq ''); thank_you(); $form->end_html; exit(); sub show_form{# The initial form print $form->start_form; print $form->textfield('name','',30,50); print " Your name\n<p>"; print $form->textfield('email','',30,256); print " Your email\n<p>"; print $form->submit; print $form->reset; print $form->end_form; exit(); } sub thank_you{#thankyou note print "Thanks, your email was so important to us we sent it to the moon\n"; #now do your sendmail routine } -------------------------------------------- perldoc CGI expand to suit your needs(extra fields, checks, error messages) Owen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>