5CS024-Team1 / asset-tracker-web

Web app for NHS Asset Tracker project
http://mi-linux.wlv.ac.uk/~1700471/asset-tracker-web/
MIT License
3 stars 3 forks source link

Email check suggestion. #10

Closed Philwlv closed 4 years ago

Philwlv commented 4 years 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 😁 👍

matthewward00 commented 4 years ago

Thanks Phil this seems a better option to do over my current method will be implementing it