Jump to content

how to validate phone number


Recommended Posts

Hi members

Can any one help me Phone number Validation

I have 1000 phone number users database .. so i want to import all phone numbers

Only who have valid phone number .. they only they can register

otherwise they cannot register


any one please help me

Link to comment
Share on other sites

Hi john

You can do this :
$phone = preg_replace("/[^+0-9]/", "", $phone);

Then if phone is not empty and length between 6 and 15 then it can't be valide.
But you can't reall know if it's a true number. You can pay a service for that, they will verify the number...



No you are Not understand my Point

I have 1000 Number already

I Provide 1000 phone nuber 1000 people

Every member while Creating New account .. That phone number Verified means .. i Will put 1000 number in database

So If that customer phone Number matches To Database phone number


Registration Sucessfully .. Otherwise please enter Valid Phone number
Link to comment
Share on other sites

Oh ok, i understand. You simply need to add a sql query in the registration process which verify that the number is on your database specific numbers table, and block if it's not ok.
Not so hard ;-)

You may even make a module for that, but i'm not sure that a module can block the registration process. Don't have time to have a look :P

Link to comment
Share on other sites

Hello,

First of all you did not mention here that which programming language you are using for your database or for your current project. As per me you will have to use Regular Expression validation control for this.
Hope this will be useful to you.


Sir you mean guide me .. what is easy process

still i didnt do any thing database .. i dont have idea how to do


please guide me .. or do you have any sample code


thanks in advance
Link to comment
Share on other sites

Hey Johnme,

Come online lets talk about this,

Your situation:

1000 phone numbers in a text file

You need:

Add 1000 phone numbers to a database table
Add a function in your registration process to check if the phonenumber exist in your "1000" list
If it exists Register otherwise show a Error message.

Am i right?

Greetings,
DutchCoding

Link to comment
Share on other sites

Hey Johnme,

Come online lets talk about this,

Your situation:

1000 phone numbers in a text file

You need:

Add 1000 phone numbers to a database table
Add a function in your registration process to check if the phonenumber exist in your "1000" list
If it exists Register otherwise show a Error message.

Am i right?

Greetings,
DutchCoding



Yes you are 100% right

i would like this only


please help me boss .. you are understand what i am interested
Link to comment
Share on other sites

Sir i am online here

can you Help me .. how to do

thanks in advance


Hey Johnme,

Come online lets talk about this,

Your situation:

1000 phone numbers in a text file

You need:

Add 1000 phone numbers to a database table
Add a function in your registration process to check if the phonenumber exist in your "1000" list
If it exists Register otherwise show a Error message.

Am i right?

Greetings,
DutchCoding
Link to comment
Share on other sites

  • 4 months later...

..........?? .....?? Did you use a translator or a thesaurus? Because it seems like you used all the wrong synonyms. I am not a native speaker of English but heck that does not look like it correct grammar.

Secondly from what i can remember he didn't need to validate the phone number in its format. but rather to check if the phone number is also in his database. if it is then the user should be allowed to register if not. he is denied.

Greetings,
DutchCoding

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...