Hello all. I am working on my site and I have the user enter in there phone number in this format xxxxxxxxx. It then goes to a mysql database. I then have the phone number appear on a different page but I want it to appear in this format (xxx-xxx-xxxx). Is this possible? I'll post a bit of code and the webpage. Webpage with Phone number
You could also cheat and have the user enter the data into 3 different text boxes (one for area code, then the first three, then the last four), separated by a hyphen, limited in length to what they're supposed to be, checked to ensure the values are numeric, and then use sttring functions to stick them together for entry into the database.
Then if they want to edit it later, you can bring it back out of the database with explode(). This way, the user has to enter data in the format you specify, so you ensure data integrity.