DarkendSoul Posted August 18, 2006 Share Posted August 18, 2006 Well when registering for an account I want it so your username can only have letters (caps/lower) and numbers along with _ (underscore) but i have no clue how i would do this... can someone help me out? :( Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 18, 2006 Share Posted August 18, 2006 $string = $_POST['usrnm'];if (preg_match('/[^0-9a-zA-Z]/',$sting) === true){ // no you can't boyo!!!!} Quote Link to comment Share on other sites More sharing options...
DarkendSoul Posted August 18, 2006 Author Share Posted August 18, 2006 thank you :) but by quick look at it it doesnt look like your aloud to use underscores :\ Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 18, 2006 Share Posted August 18, 2006 ok ....preg_match('/[^0-9a-zA-Z_]/' Quote Link to comment Share on other sites More sharing options...
DarkendSoul Posted August 18, 2006 Author Share Posted August 18, 2006 lol i hate preg_* their mixed searches get me so confused, i dont know what will and wont work...thanks for the help, i think it'll work. :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.