phpretard Posted May 6, 2008 Share Posted May 6, 2008 I am trying to validate a street address. I have managed to accept only letters and number but my code won't allow for a space. if (!eregi ("^[[:alnum:]+]+$", $COStreet)){ $valid="NOPE"; } Any helpers? Quote Link to comment Share on other sites More sharing options...
Rohan Shenoy Posted May 6, 2008 Share Posted May 6, 2008 if (!eregi ("^[a-zA-Z0-9 ]+$", $COStreet)){ $valid="NOPE"; } 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.