Hi everyone!
I'm working on a page that adds a new client. One of the form's values is a telephone number. The user enters a 10 digit number with no symbols (ex: 2288675309). Before it goes into the DB(MySQL), I want to format it so that it has hyphens (ex: 228-867-5309). After the user clicks submit, I have some javascript error checking to make sure the values are valid. If it is valid, I'm currently trying to format the number after the checks, using document.getElementById("telephone").value. I know I'm changing that value, but it doesn't change what is stored in the database. The query is made in PHP, using $_REQUEST. Any direction would be helpful!
Sidenote, not related: I may have adept programming skills in other things, but not web programming. I have about 6 months or less real experience, but hey, got to learn sometime right? :)