I am trying to stop people from accidentally entering dashes and spaces into the credit card field.
If they do, and the javascript doesn't catch them - probably due to js being turned off, then I plan to just take the dashes and spaces out.
Here's what I have so far:
str_replace(' ','',$_POST['creditCard'])
That takes care of the spaces, but not dashes. Is there a way to take out both within the str_replace function at once?