Hi, I am trying to filter out phone numbers from my forms and any help would be greatly appreciated.
Basically I have a telephone field in my form but many people are getting around my system by putting in random numbers and putting the telephone number in the text box.
I have found things that will help eg
$number= ereg_replace("0","",$number);
$number= ereg_replace("-","",$number);
But I have some problems.
1. There is a load of text - how do I extract a telephone number bearing in mind that it will be in the format 678678678, 678.678.678, 678-678-678 or 678 678 687
or any other combination people will make up to get around it.
2. There will be other numbers like BMW 318i which I would prefer not to delete (but it is not essential as there is also a field for the car model.
Has anyone done anything similar o could anyone give me a pointer, a function name of something that I can read up on.
I would be very greatful.
Thanks