Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

fw_w on "Can't receive $_POST or $_GET var in WP Plugin"

$
0
0

Hi

I'm trying write a wp plugin and want to post a form using HTTP POST. The problem is I can't receive $_POST when submit my form in plugin's class. It works outside my class only.

I hooked the function using this in my class constructor:
add_action('admin_post_add_foo', array($this, 'add_foo')

And in a function let's say I just want to dump $_POST var:

public function add_foo() {<br />
   var_dump($_POST);<br />
}

which doesn't work.


Viewing all articles
Browse latest Browse all 8245

Trending Articles