Embperl Example - Input / Confirmation - Form

# Embperl Examples - Input / Confirmation - Form

Please make sure you enter a valid email address in the source before testing the mail function [- $MailTo = 'richter@ecos.de' ; @errors = () ; if (defined($fdat{check}) || defined($fdat{send})) { push @errors, "**Please enter your name" if (!$fdat{name}) ; push @errors, "**Please enter your e-mail address" if (!$fdat{email}) ; } -] [$if (defined($fdat{check}) and $#errors == -1)$] [- delete $fdat{input} ; delete $fdat{check} ; delete $fdat{send} -]

### You have entered the following data:

Name | [+$fdat{name}+]
E-Mail | [+$fdat{email}+]
Message | [+$fdat{msg}+]
[$hidden$]

[$elsif defined($fdat{send}) and $#errors == -1$] [- MailFormTo ($MailTo,'Formdata','email') -]

### Your input has been sent

[$else$]

### Please enter your data

[$if $#errors != -1 $]
[+$errors[$row]+]
[$endif$]
Name |
E-Mail |
Message |

[$endif$]

HTML::Embperl (c) 1997-1998 G.Richter