[pmwiki-users] New recipe: Fox
marc
gmane at auxbuss.com
Thu Dec 21 06:03:06 CST 2006
Hans said...
> Wednesday, December 20, 2006, 3:32:53 PM, marc wrote:
>
> > Thankfully, a bit of lateral thinking cracked that, but although I'm not
> > surprised that the missing template wasn't reported - although it might
> > be a good idea to do so - the fact that the posted message contents is
> > lost, but a new line is written to the comments page, is not the best
> > outcome, imo.
>
> I am adding an error message, if a template page can't be found, but
> is specified. And the function will return to the page, with no added
> lines written. But I cannot prevent values from input fields being
> lost in the process. Again this would need modified Input controls
> which keep values "sticky" via javascript, I think.
You can return input values by setting, say:
<input value="<?php if (! empty ($_POST['email']) ) {echo $_POST
['email'];} ?>"
Clearly, there are a few things to think about when doing this.
> BTW, what is the best way to alert a user or admin about errors etc.,
> some easy to set up friendly message system. So far I only use echo,
> which will flash a message and the script continues to run.
I have my own mechanism for error reporting, because I feel that what
the user should see, and what and when the admin needs to know are
different things. Regardless, I prefer error_log() over echo for errors
that a user need not see.
--
Best,
Marc
More information about the pmwiki-users
mailing list