Edwin Fernandez Posted May 2, 2018 Report Posted May 2, 2018 Hi all, Is it okay to use the PHP validation code from the course "Form Validation with PHP & JavaScript", specifically the contact.php page to validate and send an email in production code, for a client website? Anything else I need to add to make sure the client doesn't get hacked or spoofing emails? Do I need something else like: filter_var($_POST['email'], FILTER_SANITIZE_EMAIL); and filter_var($_POST['name'], FILTER_SANITIZE_STRING); Are these necessary or is the code from the course safe enough? I guess I am just looking for best practices for form validation with security in mind. Thanks in advance for any help! —Edwin
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now