Just for the record: This is what I did!
Added the following in my site_html.pl at add_ en error_:
error: <input type="hidden" name="UserID" value="$in{'UserID'}">I use UserID just because It sounds cool!
.....and this is what I added to add.cgi:
In plain english:
I save some input from every entry that fails validation.
(...at least if they provide me a valid email and e serious name.)
# Print out the input to the error database. But only
# the first time this error happens. (saves server-space)
if ($in{'UserID'} eq "false") {
if (($in{'Email'} =~ /. \@. \.. /) && ($in{'Nachname'} !~ /^\s*$/)) {
open (DB, ">>$db_request_error_name") or &cgierr("error in add_record. unable to open database file: $db_request_error_name. Reason: $!");
flock(DB, 2) unless (!$db_use_flock);
print DB "$in{$db_cols[$db_modified]}$db_delim$ENV{'REMOTE_ADDR'}$db_delim$in{'Email'}$db_delim$in{'Nachname'}$db_delim$in{'Anrede'}$db_delim\n";
close DB; # automatically removes file lock
$in{'UserID'} = "true";
}
}
# Send the visitor to the error page.
&site_html_request_error ($status);
}That's right: German!
I would prefer to strip | and spaces, but I don't know how &join_encode(.........); will act if there's no hash. Who has some tips for me! (Or would it slow down the proccess to much?)
....and I'm planning to make a seperate script that will:
- check alle emailadresses agains the real and validate database.
- check for double emailadresses.
- send "he, something went wrong, please fill in our form again" email to all adresses.
- save emailed adresses in seperate file, so they don't get mailed again.
DID I MISS ANYTHING GUYS ??? LET ME KNOW !!!
Added the following in my site_html.pl at add_ en error_:
Code:
add: <input type="hidden" name="UserID" value="false"> error: <input type="hidden" name="UserID" value="$in{'UserID'}">
.....and this is what I added to add.cgi:
In plain english:
I save some input from every entry that fails validation.
(...at least if they provide me a valid email and e serious name.)
Code:
else { # Print out the input to the error database. But only
# the first time this error happens. (saves server-space)
if ($in{'UserID'} eq "false") {
if (($in{'Email'} =~ /. \@. \.. /) && ($in{'Nachname'} !~ /^\s*$/)) {
open (DB, ">>$db_request_error_name") or &cgierr("error in add_record. unable to open database file: $db_request_error_name. Reason: $!");
flock(DB, 2) unless (!$db_use_flock);
print DB "$in{$db_cols[$db_modified]}$db_delim$ENV{'REMOTE_ADDR'}$db_delim$in{'Email'}$db_delim$in{'Nachname'}$db_delim$in{'Anrede'}$db_delim\n";
close DB; # automatically removes file lock
$in{'UserID'} = "true";
}
}
# Send the visitor to the error page.
&site_html_request_error ($status);
}
I would prefer to strip | and spaces, but I don't know how &join_encode(.........); will act if there's no hash. Who has some tips for me! (Or would it slow down the proccess to much?)
....and I'm planning to make a seperate script that will:
- check alle emailadresses agains the real and validate database.
- check for double emailadresses.
- send "he, something went wrong, please fill in our form again" email to all adresses.
- save emailed adresses in seperate file, so they don't get mailed again.
DID I MISS ANYTHING GUYS ??? LET ME KNOW !!!