imjust bstarting to learn php, and i would like some help on appending a file using a form.
e.g
i have index.php in my browser and it has a text field on it i want whatever is in the text field to write to the file test.txt
this is the current code i have (dont laugh plz, this is the second day ive tryed and learnt php (about the 3rd hour))
thanks for any help you might have
Inf
e.g
i have index.php in my browser and it has a text field on it i want whatever is in the text field to write to the file test.txt
this is the current code i have (dont laugh plz, this is the second day ive tryed and learnt php (about the 3rd hour))
PHP:
<?php
$myfile = "test.txt";
$f = fopen($myfile, 'a') or die("can't open file");
$ind = "index.php";
echo "
<table border=0 cellspacing=0 cellpadding=1>
<tr>
<td>
<form action=\"$ind\" method=\"POST\">
<p>Input:
<input style=\"width:400\" type=\"text\" name=\"input\" value=\"$txt\" />
</p>
<p>
<input name=\"submit\" type=\"submit\" value=\"submit\" />
</p>
</form>
</td>
</tr>
</table>";
?>
thanks for any help you might have
Inf








