I use the following code to validate email addresses, and am trying to change it to validate the creation of a folder that will store uploaded files.
if (!eregi("a-z0-9@((([a-z0-9]+[a-z0-9\-][a-z0-9]+)|[a-z0-9])+\.)+[a-z]{2,10}$", $email)) { print "You did not enter a valid email address. Please use your browser's back button and fill out all required fields.<BR><BR>"; exit;}
I understand HOW eregi works, but all the variables in there are foreign to me. How would I change the above to check for a file name that is ONLY letters and numbers, and 16 characters or less?
IE good =
1998activeproj
IE bad =
1998activeprojects
1998-active
$active1998
Thanks for any help.