I made a script with Perlbuilder 2.0 to get data from a form, then validate the email address and email the data
Everytime I run the form it keeps telling me to enter a valid email address wich of course is my own for testing Please tell me whats wrong $message = "" ; $found_err = "" ; $errmsg = "<p>Please enter a valid email address</p>\n" ; if ($email !~ /.+\@.+\..+/) { $message = $message.$errmsg ; $found_err = 1 ; } if ($found_err) { &PrintError; } This is the script that gets the data from the form sub GetFormInput { (*fval) = @_ if @_ ; local ($buf); if ($ENV{'REQUEST_METHOD'} eq 'POST') { read(STDIN,$buf,$ENV{'CONTENT_LENGTH'}); } else { $buf=$ENV{'QUERY_STRING'}; } if ($buf eq "") { return 0 ; } else { @fval=split(/&/,$buf); foreach $i (0 .. $#fval){ ($name,$val)=split (/=/,$fval[$i],2); $val=~tr/+/ /; $val=~ s/%(..)/pack("c",hex($1))/ge; $name=~tr/+/ /; $name=~ s/%(..)/pack("c",hex($1))/ge; if (!defined($field{$name})) { $field{$name}=$val; } else { $field{$name} .= ",$val"; #if you want multi-selects to goto into an array change to: #$field{$name} .= "\0$val"; } } } return 1; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]