PHP has built in functions which might make this process easier to implement.
something like:
to first Sanitize an email variable;$emailAddress = filter_var($emailAddress, FILTER_SANITIZE_EMAIL);
then to Validate an email type;$emailAddress = filter_var($emailAddress, FILTER_VALIDATE_EMAIL);
Just a suggestion as I found these functions a few days ago 😁 👍
https://github.com/5CS024-Team1/asset-tracker-web/blob/53b5078c487b3076a96e9ac574b3d85dd631525a/api/user/temp/index.php#L23-L34
PHP has built in functions which might make this process easier to implement. something like: to first Sanitize an email variable;
$emailAddress = filter_var($emailAddress, FILTER_SANITIZE_EMAIL);
then to Validate an email type;
$emailAddress = filter_var($emailAddress, FILTER_VALIDATE_EMAIL);
Just a suggestion as I found these functions a few days ago 😁 👍