I'm creating a dummy payment page and checking if the credit card is 16 digits exactly in length and numerical only.
The problem is: If the credit card number is numerical and under 16digits it echo's ccno length, but also if the credit card number is valid (numerical and 16digits) it also echo's "ccno length".
if (!preg_match("/^[0-9]{16}$/", $ccno)) {
echo "ccno length";
exit ();
}
Thanks!