[snip] > > [snip] > > $newFile = "xml/".$type."/".$now.".xml"; > > while(file_exists($newFile)) > > $newFile = "xml/".$type."/".$now++.".xml"; > > $text = $_POST['text']; > > $text = urlencode(stripslashes(nl2br($text))); > > [/snip] > >
ack, sorry to double post... it appears that it actually reverse truncates the $text... so it cuts off the beginning of the text, and leaves the end bit. i can understand this happening as an XML interpreter as the <html> tags get in the way, but these are urlencoded, and writing to the file has nothing to do with the XML functions. [/snip] Let's work backwards then. Instead of $text = urlencode(stripslashes(nl2br($text))); try $text = urlencode(nl2br($text)); echo "$text"; Can you post the first couple of raw lines of text and then the echo'd output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php