Forum Moderators: open
if(length($email) >0){
$query = "SELECT email" . "FROM members WHERE binary email REGEXP '^$email$'";
($email) = $dbh->selectrow_array($query);
if(defined($email))
{
print"That email address is already being used";
} if(defined($email)) to if(!defined($email)) $query = "select username, password" . " from members where binary username = '$username' and binary password = '$password' limit 1";
($username, $userword) = $dbh->selectrow_array($query);
if((!defined($username)) || (!defined($password)))
{
$loginmsg="Invalid Login Information";
}
elsif((defined($username)) && (defined($password))){
print"You Have Provided Accurate Information";
} $query = "select username, password" . " from members where binary username = '$username' and binary password = '$password' limit 1";
($username, $userword) = $dbh->selectrow_array($query);
if((!defined($username)) || (!defined($password)))
{
$loginmsg="Invalid Login Information";
}
elsif((defined($username)) && (defined($password))){
print"You Have Provided Accurate Information";
} $query = "select email" . " from members where binary email_addresses = '$email'limit 1";
($email) = $dbh->selectrow_array($query);
if(!defined($email)
{
print"That email address is already listed";
}
elsif(defined($email)
{
#validate the email address
} REGEXP '^$email$'
why would you use a regular expression rather than a straight forward comparison when checking for an exact match
my $query = "SELECT pobox" . " FROM adminmembers WHERE binary pobox = '$address' limit 1";
$address = $dbh->selectrow_array($query);
if(defined($address))
{
#print error message---i.e., that email address is already registered to another user(or something similar)
} if(!defined($address))
{ #problem begins here as I tried to validate user input email information
} if(defined($address))
{
print"That Address Is Taken";
}