okay so i got a little script that from button links load different information within the same page what im trying to achieve is pulling php coding to the same file but each time i try it throws up errors
below is the code that is giving me a problem (its a banip script)
$getpage['code'] = '<p>
<center>
{
if($_POST['Submit']){
$open = fopen("ipban.php","w+");
$text = $_POST['update'];
fwrite($open, $text);
fclose($open);
}
echo "</textarea>";
$file = file("ipban.php");
echo "<center><br />Please enter the IP Address you wish to ban, One IP Address per line and click update.<br /><br /><form action=\"".$PHP_SELF."\" method=\"post\">";
echo "<textarea Name=\"update\" cols=\"50\" rows=\"10\">";
foreach($file as $text) {
echo $text;
}
echo "</textarea><br />";
echo "<input name=\"Submit\" type=\"submit\" value=\"Update\" />\n
</form>";
}