PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
/^[a-zA-Z]$/ will only match a single letter. Use /^[a-zA-Z]{1,2}$/ to match 1 or 2 characters.. or /^[a-zA-Z]+$/ to match any number of letters.
EDIT: This form field is called 'name' .. if it's a persons name you need to let the user add a lot more than just letters. Accented letters, apostrophes, hyphens, spaces and even numbers can appear in a name.