Validate phone number/std code before adding to database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jhansi
    New Member
    • Feb 2008
    • 6

    #1

    Validate phone number/std code before adding to database

    hi...


    I have created a form it's working properly.... but i want to consider phone number and STD code in two different text field for a single lable phone number.....

    and I have considered the fields like first name,last name,Date of birth, Phone Number ,mobile number and address...

    1)If i enter all the fields then only the values should enter into the database...
    2) if i dint enter the mobile field then also it should save into the database.
    3) If i dint enter the phone number field then the values should not enter into the database..

    please reply me as soon as possible

    thanks in advance
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    The idea is simple. Validate your data before adding to the database. All you need to check in this case besides security/sanitation checks is that the phone number has been entered. If it hasn't, then display an error message.

    Comment

    Working...