Jump to content

Validation function not working properly ...


nvee

Recommended Posts

I want to send all my posted variables to my POSTVAR() function to strip_tags and also run a htmlspecialchars() - It appears to complete strip_tags(), but still passes html special characters. Any ideas on why it wont work?

 

function POSTVAR($varname) {
$postname = $_POST["$varname"];
$strip = strip_tags($postname, '<p><a><ul><li>');
$return = htmlspecialchars($strip);
return $return;
}

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.