Leser: 1
8 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
foreach $name ( $obj->param )
{
if ( undef ( $name ) )
{
# gehe wieder zur Eingabemaske
}
}
else
{
my $vorname = $obj->param ( "vorname" ); #0
my $nachname = $obj->param ( "nachname" ); #1
my $strasse = $obj->param ( "strasse" ); #2
my $plz = $obj->param ( "plz" ); #3
my $wohnort = $obj->param ( "wohnort" ); #4
my $email = $obj->param ( "email" ); #5
my $kontonummer = $obj->param ( "kontonummer" ); #6
my $blz = $obj->param ( "blz" ); #7
my $bankname = $obj->param ( "bankname" ); #8
my $username = $obj->param ( "username" ); #9
my $passwort = $obj->param ( "passwort" ); #A
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
my $cgi = CGI->new();
my %params = $cgi->Vars();
my $errorMessages = "";
foreach my $key (qw(numeric integer id)) {
if ($params{$_} =~ /\D/) {
$errorMessages .= "Error: $key contains chars that are not numeric<br />";
} # if
} # foreach
foreach my $key (qw(string1 string2 text)) {
if ($params{$_} =~ /[^a-zA-Z0-9 ]/) {
$errorMessages .= "Error: field $_ contains other characters than letters, numbers or spaces<br />";
} # if
} # foreach
if ($errorMessages) {
&PrintError($errorMessages);
exit;
}
8 Einträge, 1 Seite |