We do need to see it to help you, regardless of how bad it's written.
Here's an example though:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>write content</title>
</head>
<body>
<?php
$s = $_GET["send"];
$file = "path/to/myfile.txt";
$pfile = file_get_contents($file);
if (isset($s)) {
$handle = fopen($file,"w+");
$data = $pfile."\n<hr>"."<b>".$_POST["name"]."</b>"."<br>".$_POST["message"];
fwrite($handle,$data);
fclose($handle);
}
?>
<?php
echo $pfile;
?>
<hr>
<form method="post" action="?send">
Name:
<br><input type="text" name="name">
<br>Message:
<br><textarea name="message" rows="9" cols="46"></textarea>
<br><input type="submit">
</form>
</body>
</html>
Bookmarks