more form coding

pull/15/head
necro-nemesis 7 years ago
parent 1754a420ca
commit d56b922723

@ -409,18 +409,17 @@ function DisplayLokinetConfig(){
<h2>This is Loki</h2> <h2>This is Loki</h2>
<?php <?php
$fn = "/root/.lokinet/lokinet.ini"; /// update.php
$file = fopen($fn, "a+"); $file=fopen("/root/.lokinet/.lokinet.ini","r") or die("Cannot open");
$size = filesize($fn); while(!feof($file)){
$temp=fgets($file, 4096);
if($_POST['addition']) fwrite($file, $_POST['addition']); $content .= $temp;
}
$text = fread($file, $size);
fclose($file); fclose($file);
?> ?>
<form action="<?=$PHP_SELF?>" method="post"> <form action="target.php" method="post">
<textarea><?=$text?></textarea><br/> <textfield name="content"><?php echo $content ?></textfield>
<input type="text" name="addition"/> <input type="hidden" name="filename" value="textfile.txt" />
<input type="submit" /> <input type="submit" />
</form> </form>

Loading…
Cancel
Save