Hi.
I'm working on a form that (amongst other things) takes in email addresses then checks to see if they are valid. The way I want to check them is just to assume that if they do not contain "@" then I'm gonna declare the email address as being invalid and the program will come to an end.
Anyway, I have a bit of code that checks to see if a "@" is available. It works fine. But, does anyone know how to turn this little bit of code around so that it says 'If string does NOT contain @ then print "You never gave a proper email address"'?????
Here's my little snippit of code-
} elseif (strstr($email, "@")) {
print "You never gave a proper email address";
PS- At first I thought adding a '!' before the @ would have done the job, but that doesn't work. So, the little bit of code above does the opposite of what I want!