Wednesday, 18 September 2013

How would my code convert to fixstr?

How would my code convert to fixstr?

How would this piece of code change to fixstr? the code:
user.title = '".$db->sql_escape($db->sql_escape($id))."'
How I have it written is this way but it is not finished. The code:
user.title='" . fixstr($db->sql_escape($id)) ."'
fixstr:
function fixstr($str){
$str = trim($str);
$str = str_replace("'", "''", $str);
return $str;
}
How would this code be written correctly?

No comments:

Post a Comment