rendered paste body<?if($_POST['Submit']){ $open = fopen("../../rss/st_news.xml","w+"); $text = $_POST['update']; $text = str_replace("\\", "", $text); fwrite($open, $text); fclose($open); echo "File updated.<br />"; echo "File:<br />"; $file = file("../../rss/st_news.xml"); foreach($file as $text) echo $text."<br />"; echo "<p><a href=\"./livepage.php\">click here to view the live updated webpage</a></p>"; echo "<p><a href=\"./mainadminpage.php\">click here to view the admin menu</a></p>";}else{ $file = file("../../rss/st_news.xml"); echo "<form action=\"".$PHP_SELF."\" method=\"post\">\n"; echo "<textarea Name=\"update\" cols=\"100\" rows=\"30\">\n"; foreach($file as $text) echo $text; echo "</textarea>\n"; echo "<input name=\"Submit\" type=\"submit\" value=\"Update\" />\n</form>";}?>