http://www.tiberium-...net/testing.php
try loading the page a few times it will keep adding blank lines, not sure how to fix it heres my code :S
<head>
<?php
$your_data = $_POST['textarea'];
$fp = fopen("testFile.txt", "a");
fwrite($fp, "\n".$your_data);
fclose($fp);
?>
</head>
<body>
<form id="form1" name="form1" method="post" action="testing.php">
<textarea name="textarea" cols="50" rows="5"></textarea>
<br />
<input type="submit" name="Submit" value="Submit" />
</form>
<p> <br />
<?php
$file = @fopen("testFile.txt", "r");
if ($file) {
while (!feof($file)) {
$output = fgets($file, 4096);
echo stripslashes($output)."<br />";
}
fclose($file);
}
?>
</body>
Edited by l3lueMage, 03 May 2006 - 02:50 PM.
