I filter all my input as such
PHP Code:
function format_input($input, $html_entities=1) { //Escape Codes $input = mysql_real_escape_string($input); //Trim $input = trim($input); //If Html Entities if ($html_entities==1) $input = htmlentities($input); return $input; }
but if there is an error the information gets outputted right away through
[PHP]
function format_output($output, $html_entities=0) {
//Strip Slashes
$output = stripslashes($output);
//Trim
$output = trim($output);
//If Html Entities
if ($html_entities==1) $output = htmlentities($output);
return $output;
}
[PHP]
but if I input something like: good "work"... the "work" will all disappear altogether... but if it submits through it shows up in the database... anyclues why this is happening
magic_quotes is off
|