Forum Moderators: coopster
I am using the function beneath as an attempt to sanitise, some user input. When i run this code i recive the error above. Does Any one no what causes this error?
<?php
function safe( $string ) {
$string = "'" . mysql_real_escape_string( $string ) . "'";
$string = htmlentities( $value, ENT_QUOTES, 'utf-8' );
return $string;
}
$data = "blah;/ ']";
$test = safe($data);
echo $data;
?>