Hello, Im trying to verify a ssn from a form, preg match keeps returning false if the
the post is empty, I believe i may be overlooking something. I used implode to
give preg match a string from the array. I scanned forums, couldnt find a simliar
subject. If anyone could point out what i may be doing wrong i would appreciate
it.
// ssn check
if(isset($_POST['ssn']) && (!empty($_POST['ssn'])))
{
if(!preg_match('/\d{3}-\d{2}-\d{4}/', $_POST['ssn']))
{
throw new Exception('Invalid Exception.');
}else{
$were == "good";
}
}