Hello Could somebody please help? I am creating a registration form for my site in php. One of the fields I need to create is for telephone number. Many numbers will need to start with 00. A typical number could be: 00 44 1234 5678. I can get my field to accept numbers, but after 6 digits I get an error message and it will not accept 0 or 00 as the first numbers. Could you help? Thanks in advance
Do you mean you're saving phone numbers to numeric field in the database? I would recommend to use text field for this, especially that you have numbers starting with zero. What error message are you getting?
After 6 digits it wont accept 0's right?? Then its a Bug script Think off a typical number like this 00 44 1204 5600 If wont accept 0's after 6 digits them how come a use rcan submit it
Assuming your are storing this in a MySQL database, it sounds like your phone number field is a "SMALLINT" datatype. Change this to a varchar and it should fix your problem. Also, numbers do not start 00 XXXXXXXXXX. You will either need to store it as a string (use varchar, as above) or have the prefix defined as a seperate field.
Thanks to all of you for taking time to submit your input - it’s really appreciated. I will resolve the problem by just using a text field and preventing symbols etc that may cause problems in the database. Many Thanks