I have a HTML page containg a simple form as follows...
<form method="POST" action="add.php">
Problem Description<textarea name=parm01 rows="5" cols="40" ></textarea>
Problem Resolution<textarea name=parm02 rows="5" cols="40" ></textarea>
Error Message<textarea name=parm03 rows="5" cols="40" ></textarea>
Author<input type="text" name=parm04 size=20" >
<button type="submit">Submit</button>
<button type="reset">Clear Form</button>
</form>
add.php contains...
<?php
Print("
<html><body>
<h2>Your entry has been added !</h2>
<table border=\"1\">
<tr>
<td>Problem Description</td>
<td>Problem Resolution</td>
<td>Error Message</td>
<td>Author</td>
</font>
</tr>
<tr>
<td>$parm01</td>
<td>$parm02</td>
<td>$parm03</td>
<td>$parm04</td>
</tr>
</table>
<form method=\"POST\" action=\"../awdproblog.php\">
<input type=submit value=\"Ok\">
</form>
");
$logfile="../problog.txt";
$log = @fopen ("$logfile", "a") or
die("Cannot open $logfile for write");
$entry = "
<tr>
<td>$parm01</td>
<td>$parm02</td>
<td>$parm03</td>
<td>$parm04</td>
</tr>
";
fputs ($log, "$entry");
fclose ($log);
print "</body></html>";
?>
What I expect to happen is when I click submit a new page should appear with the values I entered in a table, the values along with a bit of html should be written to the text file, and on clicking ok I would be directed to a new page.
This all works apart from where I'd expect to see values passed from the form output to the screen and written to the file I get no data at all (just the html bits).
I read in a book some where that this is because the variables are unbound but I dont really know ?
Does any one know if this a config problem or is my code just really bad ?
Thanks,
Andy.