سؤال

I am new to Modx and I want to write a custom but of code in a snippet that handles incoming post data. Unfortunately I can't seem to be able to collect the post data using $_POST. Can anyone point me in the right direction please? Cheers John

هل كانت مفيدة؟

المحلول

Also, if you do not wish to cache the results of the snippet call use [[!getPost]] rather than [[getPost]].

نصائح أخرى

I've used

<?php
var_dump($_POST);

and [[getPost]]

and it worked (I got an array of 0, but I didn't send anything in post)

Vardump is a VERY bad idea.

The MODx Revolution Object is huge...

Please try:

<?php
print_r($_REQUEST);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top