Currently I have the following in to check for 'special' characters and 'spaces' in the name input from a form.
if(strchr($new_name," ") || strchr($new_name,"_") || strchr($new_name,"-")) {
My question is, rather than doing it this way... can I just have a check to see if its alpha-based only (ie. if it has numbers, spaces, special characters, etc it will be automatically denied)? I am looking for a way so I dont have to have a part to look for every little thing, but just allow alphacharacters (ie. a to z) only.
-- M