View Single Post
Old 11-14-2012, 03:00 AM   PM User | #2
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,891
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
PHP Code:
is_numeric($input
is all you really need for a phone number unless you want to allow international numbers (which I assume you dont)

from my experience people will often add spaces (even when you tell them not to)...e.g. '04033 55555'
so you might be well to $input=str_replace(' ','',$input) , then check for strlen() and is_numeric().
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

Last edited by firepages; 11-14-2012 at 04:10 AM.. Reason: spelin'
firepages is offline   Reply With Quote
Users who have thanked firepages for this post:
LearningCoder (11-14-2012)