etechnicsit
asked on
PHP Form Validation - Phone Number format - 0123456789
Hi Experts,
I need to validate the value of a text box. The text box is for the customers phone number in the format 0123456789 (ie 10 numbers only)
The data is sent to a page (validate.php) via a forms POST method.
I want a function that will ONLY accept 10 numbers one after another, no letters or characters.
Thanks in advance.
I need to validate the value of a text box. The text box is for the customers phone number in the format 0123456789 (ie 10 numbers only)
The data is sent to a page (validate.php) via a forms POST method.
I want a function that will ONLY accept 10 numbers one after another, no letters or characters.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works like a charm!
Sorry ixti first in best dressed
Sorry ixti first in best dressed
hello i have problem in ie6.
is there any one to solve my problem..
is there any code for ie6 compatibility?
this is my site jesustv.in
is there any one to solve my problem..
is there any code for ie6 compatibility?
this is my site jesustv.in
if (!is_numeric(substr($_POST
//invalid
} else {
//valid
}
or
if (!is_numeric($_POST['phone
//invalid
} else {
//valid
}