"; foreach ($xml->post as $post) { echo "
\n"; echo "".$post->name." : ".$post->message."
"; } echo ""; } if ($post) { $message = wordwrap($message, 15, " ", 1); //No too long words $name = htmlspecialchars($name, ENT_QUOTES); $message = htmlspecialchars($message, ENT_QUOTES); // Cleaned up against HTML $character = $xml->addChild('post'); $date_=date("d/m/y"); $time_=date("H:i:s"); $character->addChild('date', $date); $character->addChild('time', $time); $character->addChild('name', $name); $character->addChild('message', $message); echo $xml->asXML(); // XML formatted } $formcode =''; echo $formcode; ?>