A page that takes a post redirects the browser to a plain page, so a refresh cannot post
twice - and then the page the browser lands on has to say what happened. A flash message
carries that: padFlash ( 'Thanks, your message was sent.' ) before the
padRedirect (), and {flash} on the page it leads to.
|
PHP fragments/flash_messages_1.php |
HTML fragments/flash_messages_1.pad |
Result |
|---|---|---|
|
|
Your message was sent. |
{$message}
and {$type}; without a message the @else@ half renders.
{flash 'error'} shows the messages of that type only.padFlash, info when it is
left out.padFlash cookie tells the next request that there is something to take, so the
pages that never flash do not open the session at all.