Jump to content
Killersites Forums

Using PHP Validation Code From Course In Production Code?


Recommended Posts

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

Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...