mysql real escape object error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hmmm
Forum Newbie
Posts: 2
Joined: Tue Nov 23, 2010 3:05 pm

mysql real escape object error

Post by hmmm »

Edit: Fixed mysql_real_escape problem ;)

But why does my htmlentities do nothing??

E.g. Input returns same output :S.

Code: Select all

$string = "<b>B</b>";
$SD = $obj->CHECK($string);
echo $SD;

Code: Select all

 $okdata= htmlentities(trim($data));
 return $okdata;

outputs:<b>B</b>, strip_tags does the job, but as soon as anyone enters a <, all input is removed. So it is overkill :/
Edit2: When I change input to end in </html>. the code doesn't output :S.
Post Reply