also:
Durch die Hilfe von Philipp sieht jetzt mein script so aus:
#!/usr/bin/perl
$datfile="mitteilung.txt";
print "Content-type: text/html\n\n";
####### Formulardaten einlesen ###################
my $cgi = new CGI; # OOP!!!
use CGI;
use strict;
my $name = $cgi->param("vuname");
my $mitteilung = $cgi->param("mitteilung");
my $passwort = $cgi->param("pw");
my $passwort2 = $cgi->param("pwst");
my $email = $cgi->param("email");
if ($pw != $pwueb) {
print "<html><head><title>FEHLER</title></head>\n";
print "<body bgcolor="navy" text="red" link="yellow" alink="lime" vlink="yellow"\n";
print "<h1><center>Es ist ein Fehler aufgetreten</center></h1>\n";
print "<br><br>\n";
print "Ihre Passwörter $passwort und $passwort2 stimmen nicht überein! <br>\n";
print "<br><br><a href="javascript:history.back()">Zurück</a></body></html>\n";
};
print "<html><head><title>Vielen Dank für ihre Eingaben</title></head>\n";
print "<body bgcolor="navy" text="white" link="yellow" alink="lime" vlink="yellow"\n";
print "<h1><center>Vielen Dank für ihre Eingaben</center></h1><br>\n";
print "<br><br>\n";
print "Ihr Name = $name <br>\n";
print "Ihre Mitteilung = $mitteilung <br>\n";
print "Ihr Passwort = $passwort <br>\n";
print "Ihre E-Mail adresse = $email <br>\n";
print "<br><br><a href="javascript:history.back()">Zurück</a></body></html>\n";
if ($action eq "start") {&start;}
open(DATA,">>$datfile");
print DATA "$name§$mitteilung§$passwort§$passwort2§\n";
close(DATA);
sub start {
open(INDEX,"$datfile");
@index = <INDEX>;
close(INDEX);
foreach (@index) {
$dzeil =$_;
chomp($dzeil);
($name,$mitteilung,$passwort,$passwort2) = split(/§/,$dzeil);
print "Ihr Name = $name\n";
print "Ihre Mitteilung = $mitteilung\n";
print "Ihr Passwort = $passwort\n";
print "Ihre Passwortbestätigung = $passwort2\n";
exit;
}
}
Diesmal bekomme ich einen Internal Server error.
Es wäre nett wenn mir jemand gleich das funktionsfähige script hineinschreibt. Danke