I know how to write to a text file;
But how do i change it so that the stuff writen from the form is at the top of the page rather than the bottom.PHP Code:<?php
$FormData = $_POST["FormData"];
if (!isset($_POST['submit'])) {
?>
<form method="post" action="<?php echo $PHP_SELF;?>">
Data:<br>
<input type="text" style="width: 400px;" name="FormData"><br>
<br><br>
<input type="submit" value="submit" name="submit" size="50">
</form>
<?
} else {
$submit = fopen("data.txt", "a");
fputs ($submit,implode,("\n"));
fwrite($submit,"$FormData");
fclose($submit);
echo "Done!";
}
?>
+Rep for help
Tom





Reply With Quote










