hello i am new in php i am trying to create a simple registration form but i cant filter my text box all i want is accept only letters
accept only letter in php
Page 1 of 12 Replies - 243 Views - Last Post: 12 September 2012 - 10:26 PM
Replies To: accept only letter in php
#3
Re: accept only letter in php
Posted 12 September 2012 - 10:26 PM
richienuez, on 13 September 2012 - 04:51 AM, said:
hello i am new in php i am trying to create a simple registration form but i cant filter my text box all i want is accept only letters
You can filter your input using regex:
if(preg_match('/^[a-zA-Z]+$/',$your_input)){...}
Maybe you should check this article called 15 PHP regular expressions for web developers.Edit: Apparently the link won't work because somehow <b></b> is added in the page URL, just remove it in order to view the article
This post has been edited by StefanOnRails: 12 September 2012 - 10:33 PM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote






|