Jaime1985
05-13-2005, 03:44 AM
Hi everyone
Is there a way you can validate/strip values once someone has clicked the Submit button on a form?
As an example, if I enter into a textbox the value: $2000
This value will be posted to on to script file that puts it into a database.
Is it possible so that the $ sign gets stripped out before its passed onto the database?
I don't particularly want an error message hitting the user asking him to enter it again because he included the $ sign. I need something that happens behind the scenes that looks at the value he entered and strips out anything that isn't a number and then simply passes it through to the database.
I'm being so picky because for the sake of my data integrity, some users are entering the '$' sign and some aren't. Some are entering a ',' symbol, which also has the same affect. This is annoying when it comes to sorting the data and reporting. If anyone can help, be much appreciated :-)
James
Is there a way you can validate/strip values once someone has clicked the Submit button on a form?
As an example, if I enter into a textbox the value: $2000
This value will be posted to on to script file that puts it into a database.
Is it possible so that the $ sign gets stripped out before its passed onto the database?
I don't particularly want an error message hitting the user asking him to enter it again because he included the $ sign. I need something that happens behind the scenes that looks at the value he entered and strips out anything that isn't a number and then simply passes it through to the database.
I'm being so picky because for the sake of my data integrity, some users are entering the '$' sign and some aren't. Some are entering a ',' symbol, which also has the same affect. This is annoying when it comes to sorting the data and reporting. If anyone can help, be much appreciated :-)
James