When my password field is empty and i hit submit it gets stuck in a loop involving the sub error and i get a popup box coming up continualy i tried using an unless statement but i cant get it to work all my form scalars are being set correctly i see the values in the error popup box.
Also i cant get my mailto line to work.
Can anybody help
MadAxe
Also i cant get my mailto line to work.
Can anybody help
MadAxe
Code:
##########################################################################
open (USERLIST, "$userlist");
@userlist = <USERLIST>;
close (USERLIST);
foreach $dataline (@userlist){
chomp $dataline;
($username, $password) = split(/\|/, $dataline);
if ($username eq $sender) {
if ($password eq $pass) {
print "mailto:$email subject=$subject body=$content\n";
}
}
}
################################################################################
if ($password ne $pass) {
&error;
}
unless ($pass eq "") {
}
############################# Sub Programmes ###################################
sub error {
print <<EndStart;
<HTML>
<HEAD>
<script type="text/javascript">
<!--
alert ("INCORECT PASSWORD. $pass $password $username $sender")
// -->
</script>
</HEAD>
EndStart
print "<html><head><META HTTP-EQUIV=\"REFRESH\" CONTENT=\"0;URL=$failedlogin\"></head></html>\n";
print "<a href=\"$failedlogin\">Click here to contine!</a>";
exit;
}