Skip to content

Commit

Permalink
Extra Perl Validation
Browse files Browse the repository at this point in the history
  • Loading branch information
theolaa committed Jul 31, 2021
1 parent 643188d commit a5db1ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cgi/bmi_calculator.pl
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
my $query = new CGI();

my %data;
$data{firstname} =$query->param('firstname');
$data{firstname} $query->param('firstname');
$data{firstname}=~s/(<([^>]+)>)//ig;
$data{firstname} =~ s/^\s+|\s+$//g
$data{lastname} = $query->param('lastname');
$data{firstname}=~s/^\s+|\s+$//g
$data{lastname}=$query->param('lastname');
$data{lastname}=~s/(<([^>]+)>)//ig;
$data{lastname} =~ s/^\s+|\s+$//g
$data{email} = $query->param('email');
$data{lastname}=~s/^\s+|\s+$//g
$data{email}=$query->param('email');
$data{email}=~s/(<([^>]+)>)//ig;
$data{email} =~ s/^\s+|\s+$//g
$data{email}=~s/^\s+|\s+$//g

# print $query->header;
print "Content-type: text/html\n\n";
Expand Down

0 comments on commit a5db1ec

Please sign in to comment.