[b]NOTE:[/b] I am not a web developer. I'm frightingly unaware of safe practices and standards. What I'll show you now might quite possibly feed bad data to your server, prompting the return of SATAN and a premature end of mankind. [b]However[/b], it does seem to work pretty well for me.
If you've got more knowledge that I do, please inform us all. If you just got more sense than I do, stay away.
Here goes:
In [b]functions-controller.php[/b], this is what happens if the user fail their submission (bad captcha or no name/email/comment):
`
$stored = array($_POST['name'], $_POST['email'], $website, $_POST['comment'], false);
if (isset($_POST['remember'])) $stored[3] = true;
$error = true;
`
Specifically note `if (isset($_POST['remember'])) $stored[3] = true;`. This line confuses the hell out of me. It overwrites the `$_POST['comment']` (comment text) that we just inserted the line before, with a "1". I can't find where this hardcoded value is read again, so I'd rather not mess with it. If you know - please inform me.
Now, here's my ugly workaround:
`
$stored = array($_POST['name'], $_POST['email'], $website, $_POST['comment'], false);
$stored[5] = $_POST['comment'];
if (isset($_POST['remember'])) $stored[3] = true;
$error = true;
`
Simply added a sixth field and keeping the comment text safe in there. To get this back out into the comment form, heres what you need to add in [b]image.php[/b]:
`<textarea name="comment" id="comment" rows="5" cols="100%" tabindex="4" >[b]<?=$stored[5];?>[/b]</textarea>`