I have a text box that the user is supposed to enter a dollar amount in. I want to check in my script to make sure that they enter a numerical value only. I know just about how to do it, I think, but it isn't working like I'd hoped. Thanks in advance!
D O N
Here is the code I have now:
if ($amount!~ /[^\d]/){
throw an error
}
I got this line (/[^\d]/) from another website.