Forum Moderators: coopster
The settings.php contains these 3 vars.. $sitename, $email, $url...
Here is the editor code:
<?php
$loadcontent = "settings.php";
if($save_file) {
$savecontent = stripslashes($savecontent);
$fp = @fopen($loadcontent, "w");
if ($fp) {
fwrite($fp, $savecontent);
fclose($fp);
}
}
$fp = @fopen($loadcontent, "r");
$loadcontent = fread($fp, filesize($loadcontent));
$loadcontent = htmlspecialchars($loadcontent);
fclose($fp);
?>
<form method=post action="<?=$_SERVER[PHP_SELF]?>">
Site name: <input name="savecontent" type="text" value="<?=$sitename?>" size="70">
Email: <input name="savecontent" type="text" value="<?=$email?>" size="70">
URL: <input name="savecontent" type="text" value="<?=$url?>" size="70">
<br>
<input type="submit" name="save_file" value="Save">
</form>
at first sight
what are for the " = " after " <?
for example in:
="<?=$_SERVER[PHP_SELF]?>">
as is $_SERVER will not perform as expected!
as well as the others
try removing the equal sign after: <?
<edit> Sorry! I found your question in the sub-title</edit>