[pmwiki-users] Debug statements was Re: This time a disappearing $_POST

Crisses crisses at kinhost.org
Tue Sep 19 05:40:28 CDT 2006

On Sep 19, 2006, at 5:25 AM, The Editor wrote:

> Anyway, I had omitted the (:input end:) in the main page and therefore
> the two forms ran together and conflicted. I did something like
> Crisses suggested and I saw all the other fields coming through, and
> that helped to solved the problem.

My suggestion was a debugging statement:


If you don't want to ruin the headers (if you need the session/cookies):

$MessagesFmt[] = print_r($_POST, true);

Without the "true" flag, print_r will print directly to output, and  
not be able to be stored in a variable.  PmWiki will display the  
message but it requires (:messages:) in the wiki markup on the page  

If you want it to look better use:

$MessagesFmt[] = "<pre>" . print_r($_POST, true) . "</pre>";

This works for any variable or array, not only $_POST.


More information about the pmwiki-users mailing list