[snip] $newFile = "xml/".$type."/".$now.".xml"; while(file_exists($newFile)) $newFile = "xml/".$type."/".$now++.".xml"; $text = $_POST['text']; $text = urlencode(stripslashes(nl2br($text))); [/snip]
At this point (for testing putposes) I would echo "$text"; and start looking for clues. If I were a betting man I would have to say that there is some problem with quotes within the text. I hope that this points you in the right direction. Have a pleasant and fruitful day! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php