Ciao a tutti,
ho bisogno un favore: non ho nessuna conoscenza di Perl. Ho uno script per mandare i dati raccolti in un form a un indirizzo mail. Vorrei che dopo l'invio l'utente del mio sito venga indirizzato verso una specifica pagina html: cosa devo aggiungere allo script per fargli fare questa operazione? Questo script stampa : thank you..eccetera..questa parte non mi interessa, vorrei solo indirizzare l'utente verso una pagina del sito.
Grazie mille
Heter
read(STDIN, $namevalues, $ENV{'CONTENT_LENGTH'});
open (MAIL, "|$mailprog $youmail") || die "Can't open $mailprog!\n";
print MAIL ("To: $youmail\n");
print MAIL ("From: Internet User\n");
print MAIL ("Subject: Form Response\n\n");
# Process info from Fill in Form
@namevalues = split(/&/, $namevalues);
foreach $namevalue (@namevalues) {
($name, $value) = split(/=/, $namevalue);
$name =~ tr/+/ /;
$value =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$INPUT{$name} = $value;
unless ($value eq "") {
print MAIL ("$name: $value\n");
}
}
close (MAIL);
# Print Follow up HTML
print ("Content-Type: text/html\n\n");
print ("<html><head><title>Thank You</title></head>\n");
print ("<body><h1>Thank you very much</h1>\n");
print ("You sent the following informations geschickt:<hr>\n");
foreach $namevalue (@namevalues) {
($name, $value) = split(/=/, $namevalue);
$name =~ tr/+/ /;
$value =~ tr/+/ /;
$name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$INPUT{$name} = $value;
unless ($value eq "") {
print ("$name: $value
\n");
}
}
print ("<hr>\n");
print ("<a href=\"$backurl\">Back to $backname</a><hr>\n");
print ("</body></html>\n");
exit;