Jump to content

simple validation functions


Drongo_III

Recommended Posts

Hi Guys

 

Simple question. Can anyone tell me why this doesn't work please?

 


$test = "<HEELOOOO";

$test2 = filter_var("$test", FILTER_SANITIZE_STRING);

echo $test2;

 

When I run this get I get nothing echoed back, not even in the source. So can the filter function not be used like this? I thought it would encode the special character and return it but I must be missing something simple here!

 

Thanks,

 

Drongo

Link to comment
https://forums.phpfreaks.com/topic/237225-simple-validation-functions/
Share on other sites

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.