Hi people, i have tried using preg_match to validate the username entered by a user;
if (preg_match("/[\^<>\;.#|`\$\&]/",$username)) {
however, after tests all illegal characters are not barred out. I was wondering if anyone can put the following sentence into a valid PHP if statement, as im struggling;
if the $username contains a character that is not one of the following;
1,2,3,4,5,6,7,8,9,0,_,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
then display error message.
Cheers,
Jonathan