Hello Prel Gurus, I've learned more as time go's on, especially with all your HELP:) My last attempt has been somewhat difficult. Can anyone advise regarding CGI perl scripts. 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.. I've tried Perl Monks for some wisdom but they couldn't give me a start on the right direction:( Or better yet when the following variables;ie $candidate,$position,$education etc are loaded with data via an HTML form is there a way to know if when emply to say;
This is the part I need helpw with;... if (!$.....){ print error }elsif (!$.....){ print error.. } $form_data = $ENV{'QUERY_STRING'}; $form_data =~ s/%([\dA-Fa-f][\dA-Fa-f])/pack ("C",hex ($1))/eg; # Replace "+" sign with " "space char. $form_data =~ s/\+/ /g; # Split $form_data into name/value pairs: @fields = split (/&/, $form_data); # Init variables with form data values from following fields: # From Text Fields: ($form_name, $candidate) = split (/=/, $fields[0]); ($form_name, $position) = split (/=/, $fields[1]); # From Radio buttons: ($form_name, $education) = split (/=/, $fields[2]); ($form_name, $status) = split (/=/, $fields[3]); ($form_name, $hired) = split (/=/, $fields[4]); # From Comments Field: ($form_name, $comments) = split (/=/, $fields[5]); # Print and append file dataform.html # open(OUT, ">> dataform.html") or die "Can't open file: $!"; print OUT "CANDIDATE: $candidate\n"; print OUT "POSITION TYPE: $position\n"; print OUT "LEVEL OF EDUCATION: $education\n\n"; close OUT; # Send back user confirmation: print << "END_OF_REPLY"; Content-type: text/html <HTML> <HEAD> <TITLE> Confirmation</TITLE> </HEAD> <BR><BR><BR> <H1 ALIGN=CENTER>Thankyou $candidate !</H1> <BR> <H1 ALIGN=CENTER>The $position position is vacant!!</H1> <BR> <H1 ALIGN=CENTER>It will take us several weeks to process.</H1> <BR> <H1 ALIGN=CENTER>Computer Network Division Inc</H1> <BR> </HTML> END_OF_REPLY nova> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]