FormMail within a CGI Script

2008-09-20 Thread Mike Flannigan


Within a start_html block in a CGI script I do this:

   button(-name='button_name',
   -value='I have info to contribute',
   -onClick=redirectmail()),


In redirectmail() is have:

sub redirectmail {
print header,
   start_html('Mail Info'),
   h1('Mail Info'),
   FORM 
ACTION=http://somewebhost/forms?login=myusernameto=myaddressconfirm=confirmed.htmlerror=error.html; 
METHOD=POST,

INPUT NAME=recipient TYPE=HIDDEN VALUE=myaddress,
TABLE,
TR,
 TD valign=middleYour Name:/TD, ===THIS LINE GIVES 
ERROR

 TDINPUT NAME=name SIZE=30/TD,
/TR,
TR,
 TD valign=middleYour E-mail:/TD,
 TDINPUT NAME=e-mail SIZE=30/TD,
/TR,
   TR,
 TD valign=middleCemetery Link:/TD,
 TDINPUT NAME=link SIZE=60 VALUE=Some Subject/TD,
/TR,
TR,
 TD valign=middleSubject:/TD,
 TDINPUT NAME=subject SIZE=60/TD,
/TR,
TR,
 TD valign=topBRComments:/TD,
 TDTEXTAREA NAME=body VALUE= cols=60 
rows=10/TEXTAREA/TD,

/TR,
INPUT NAME=followup-page TYPE=HIDDEN VALUE=myfollowuppage,
TR,
 TD/TD,
 TDINPUT TYPE=submit name=submit VALUE=Send/TD,
/TR,
/TABLE,
/FORM;
end_html;
}


When I run the CGI file is gives Software error:
syntax error at /dir/test.pl line 125, near TD valign=middleYour Name
Execution of /dir/test.pl aborted due to compilation errors.

I am very new at CGI, but not Perl.  Can anybody explain
what I am doing wrong?  It may be something very basic.

I get the digest version of this list, so I'd appreciate it if
you sent it to me directly along with sending it to the list.


Mike Flannigan




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




Re: FormMail within a CGI Script

2008-09-20 Thread Randal L. Schwartz
 Mike == Mike Flannigan [EMAIL PROTECTED] writes:

This is Perl...

Mike sub redirectmail {
Mike print header,
Mikestart_html('Mail Info'),
Mikeh1('Mail Info'),

But this isn't...

MikeFORM
Mike 
ACTION=http://somewebhost/forms?login=myusernameto=myaddressconfirm=confirmed.htmlerror=error.html;
Mike METHOD=POST,
Mike INPUT NAME=recipient TYPE=HIDDEN VALUE=myaddress,
Mike TABLE,

You need a Perl program, not a mashup of two different things.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/