I have to start by thanking you all for your help so far - its been invaluable. If it were'nt for you guys and gals i would have pulled my hair out by now !!!!!
OK - here is the thing: I have written some code and it works fine (yahoooo), but i was wondering if there is a more 'PERL' way of doing things as this code looks bulky to me !!!!
the code id:
## check to see if username or email already exist
$errmesseml = "False"; $errmessuser = "False"; $emailuserfound = "False";
if($dbemail eq $email) { $errmesseml = "True"; }
if($dbusername eq $membusrname) { $errmessuser = "True"; }
## create readable error message
$errmessage = "";
if (($errmesseml eq "True") and ($errmessuser eq "True"))
{
$errmessage = "Both the email address and the username have already been used";
$emailuserfound = "True";
}
if (($errmesseml eq "True") and ($errmessuser ne "True")) { $errmessage = "The email address has already been used"; $emailuserfound = "True"; }
if (($errmesseml ne "True") and ($errmessuser eq "True")) { $errmessage = "The username has already been used"; $emailuserfound = "True"; }
I have tried to use lines like:
if ($errmesseml and !($errmessuser)) { do something }
but it doesnt work !!!! A bit of a bummer really - any ideas ?????
Thanks again
Anadi
_________________________________________________________________ Chat online in real time with MSN Messenger http://messenger.msn.co.uk
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]