Jump to content

htmlentities(), strip_tags(), utf8_decode(), stripslashes ()


Miss-Ruth

Recommended Posts

I'm using the following filters to prevent email injection. Is this sufficient to prevent an injection/hijacking? or am I missing something?

 

$email = $_POST['email'];
$email = strip_tags($email);
$email = htmlentities($email);
$email =utf8_decode($email);
$email = stripslashes ($email);
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);

 

I really appreciate your feedback.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.