<?php
if($_POST) {
$f = fopen("mypage.html", "w");
fwrite($f, "<html><head><title>".$_POST['title']."</title></head><body>".$_POST['html-code']."</body></html>");
fclose($f);
}
?>
<form action="" method="post">
<label for="title">Titel</label><input type="text" name="title" id="title" />
<label for="html-code">Indhold</label><textarea name="html-code" id="html-code"></textarea>
<input type="submit" value="Opret HTML side" />
</form>
Indlæg senest redigeret d. 18.05.2010 13:08 af Bruger #12245