-
☆ A M B ☆
- 24,524 Posts
How are you calling the snippet? An interactive snippet like that needs to be called uncached. [!...!] for Evo, and [[!...]] for Revo.
-
☆ A M B ☆
- 24,524 Posts
That’s because of how the parser more-or-less works. A snippet is evaluated (putting its code through the PHP eval() function) and its output is inserted into the page where the snippet tags were. If this output is a form, it will have the usual submit button and action attributes. Now, if that whole page, snippet and all, gets cached, when the submit requests the page again with the POST values from the form, there is no snippet code to process those POST values! All you’ll get is what was in the page when it was cached.
An uncached snippet isn’t processed immediately; the page is processed and cached, then in a post-processing process a few odds and ends are cleaned up, including evaluating all uncached snippets. This post-processing is also performed on pages taken from cache, so the uncached snippet will get evaluated in all cases. Thus the re-requested page from the form’s action attribute will get its POST values processed.
While Revo doesn’t use the PHP eval() function for snippet code (it writes the snippet code to a .php file and includes it) the cached/uncached feature has the same effect.