I think you would have found answers to both of these by searching, however...
- Testing that a string contains only
alpha/numeric characters (both upper and
lower case).
if (!eregi("[a-z0-9]",$string)) {
... error action ...
}
- Testing that a string contains an '@'
and a '.' somewhere, and in that order
(very basic email validation).
Dunno why you're going for "very basic" validation - it's all or nothing, and if you want all, there's plenty of sample code both here and on other sites that will help you do it...
a
d
a
m