With regular expressions. For e-mail:
if (ereg("[@]+@[@]+.[@]+$", $input))
...good address...
else
...bad address...
This still allows some bad input (i.e. use of spaces), but it can be improved, depending on what exactly you want. Kinda long to explain it all here.