I am using preg_replace to validate first and last name coming from my database. If I don't include preg_replace, the values are passed on like normal, but if I do use it, nothing is passed. Here is my current code:
$firstname = preg_replace("/^[A-Za-z]+$/", "", $firstname);
$lastname = preg_replace("/^[A-Za-z]+$/", "", $lastname);
I am using similar validation for other variables without issue, it's really only happening for these. I'm not too familiar with validation, so any help would be appreciated.