Then the edit's are passed using a form and POST to a file named update_config.php, the code is:
Code: Select all
<? include('../../config.php'); ?>
<?php
$ip = $_POST['ip'];
$submit = $_POST['submit'];
unlink("../config.php");
touch("../config.php");
$filename = "../config.php";
$fp = fopen($filename, "w") or die("Could not open $filename");
fwrite($fp, "$ip");
fclose($fp);
echo "Updated, please <a href=\"configure.php\">click here</a> to go back";
?>Code: Select all
$name = "steve";Code: Select all
$name = \"steve\";Code: Select all
$blogname = "Steve's Blog";Code: Select all
$blogname = \"Steve\'s Blog\";