vkara101 Posted March 16, 2007 Share Posted March 16, 2007 Hey everyone, this is my first post and also my first attempt at PHP. I'm wondering if anyone can help me. I am trying to validate a form field using that following statement. function is_valid_email($firstname_field) { return preg_match('What do i put here???', $firstname_field); } if (!is_valid_email($firstname_field)) { echo 'Sorry, invalid name'; exit; } What i want to do is have the field to check that it contains only letters, either lower or upper case. But i can't figure out what needs to go in the bit where i've put 'What do i put here' I'd be grateful for any help. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/43017-php-validation/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.