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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.