Hi to everyone, I have a problem with a simple html form that send simple data to my perl script, i remember, but i'm not sure, that without fastcgi this working fine, but with fastcgi nothing to do. The code now:
Form:
Script:
this was more complicated but just for trying I print a single field of html form...but doesn't work!!!
Someone can help me please?
Sorry form my english :)
Form:
Code:
<form name="myForm" method="post" action="regScript.pl"><br /> Nome: <input type="text" name="Nome"><br /> Cognome: <input type="text" name="Cognome"><br /> Matricola: <input type="text" name="Matricola"><br /> Password: <input type="text" name="Password"><br /> <input type="submit" name="subbtn" value="Submit"> </form>
Code:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
read(STDIN, $FormData, $ENV{'CONTENT_LENGTH'});
@dati = split(/&/, $FormData);
foreach $el (@dati) {
($name, $value) = split(/=/, $el);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
print $FORM{'Name'};
Someone can help me please?
Sorry form my english :)