as always, data validation is key.
whenever you can, it's good to go for something which specifically allows good cases, and blocks others, instead of ruling out specific bad things.
the email checking function i found somewhere is:
[PHP]
function email_check($data) {
return eregi("^[a-zA-Z0-9]+[_a-zA-Z0-9-]*(\.[_a-z0-9-]+)*@[a-z??0-9]+(-[a-z??0-9]+)*(\.[a-z??0-9-]+)*(\.[a-z]{2,4})$", trim($data));
}
[/PHP]
for all of those other fields that you are taking from post data, do a couple extra checks to make sure they arn't trying anything tricky:
[PHP]
function text_check($data) {
return eregi('^(\.[a-zA-Z0-9+=/:!@_-^()?,|{} ]*)*$',trim($data));
}
[/PHP]
--Will