----- Original Message -----
From: "AMORE,JUAN (HP-Roseville,ex1)" <[EMAIL PROTECTED]>
To: "Beginners@Perl. Org (E-mail)" <[EMAIL PROTECTED]>
Cc: "John Amore (E-mail)" <[EMAIL PROTECTED]>; "AMORE,JUAN
(HP-Roseville,ex1)" <[EMAIL PROTECTED]>
Sent: Saturday, December 01, 2001 9:33 AM
Subject: Any takers,...


>
> Hello Prel Gurus,

> I need to inject a if elsif else statement in the below code so that if
any
> one of
> my HTML form fields is empty for it to print a simple HTML error message
> until all fields are loaded with data..
>
> This is the part I need helpw with;...
>
> if (!$.....){
> print error
>  }elsif (!$.....){
>  print error..
> }
>

How about a subroutine for your html msg if the required field is empty.
Assuming your values are $form{'value'}; therefore you could write as
follows ..

&empty_field;

if ($form{'value'}) {
   # do your stuff here
};

# print your html here
sub empty_field {
print qq`
<head><title><body>
all your html codes.... comments etc....
`;
exit;
};





_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to