Working on it now. I'll post it up soon.
Here's a
really basic example.
PHP Code:
if(empty($_POST['step']))
{
?><form action="?" method="POST">
<input type="text" name="a_field">
<input type="hidden" name="step" value="2">
<input type="submit"></form><?
}
if($_POST['step'] == "2")
{
$filename = 'data.txt';
$somecontent = $_POST['a_field']."\n";
$handle = fopen($filename, 'a+');
if (fwrite($handle, $somecontent) === FALSE)
{
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote $somecontent to file $filename";
fclose($handle);
}
You can see it in action here:
http://www.ncisolutions.com/projects...rm-to-file.php
It works now.