PHP beginner |
|
edit.php:
<form action="save.php" method="post">
<textarea name="tekst">
<?php include("announcement.php"); ?>
</textarea>
<input type="submit" value="Save!">
</form>
<form action="save.php" method="post"> <textarea name="tekst"> <?php include("announcement.php"); ?> </textarea> <input type="submit" value="Save!"> </form>
save.php:
<?php
$pointer=fopen("announcement.php","w+");
fputs($pointer,$_POST['tekst']);
fclose($pointer);
?>
<?php $pointer=fopen("announcement.php","w+"); fputs($pointer,$_POST['tekst']); ?>
Let op: dit in 5 minuten geschreven script is niet getest |