- Impact
- 1
I have got a problem with a character. I do not know which one it is. I am inserting long text files into database and sometime i can not insert. Any idea which character can it be?
I am using this code
I am using this code
PHP:
$links.=$_POST['links'][$i];
$description=$_POST['description'][$i];
$type=$_POST['type'];
if (!get_magic_quotes_gpc()) {
$title=addslashes($title);
$links=addslashes($links);
$description=addslashes($description);
}
$to_replace = array("\r\n","|","\n","\\r\\n","\\n");
$title = str_replace($to_replace, " ", $title);
$description = str_replace($to_replace, " ", $description);
//echo $title . '<br/>';
$query="INSERT INTO `filedetails` VALUES ('', '".$type."', '".$title."', '".$description."', '".$links."','0000000000')";
mysql_query($query);