I have some basic HTML forms that are part of a template.
I am trying to access the data being entered using php superglobal $_POST within the results template but nothing is showing up.
For example…
in one template, as a test, I have this simple form that passes some data to a results page when submit:
<form action="{path=test/actions}" method="post">
<input type="hidden" name="title" value="testing post" />
<input type="submit" value="submit val" />
</form>In the “actions” result page I am outputing $_POST within php tag and I can’t get any meaningful output.
<?php
echo print_r($_POST);
?>I also used to be able to access global input like this by using CI function:
<?php
echo $this->EE->input->post('title');
?>But this doesn’t work for me either now.
I get PHP error message:
Message: Undefined index: title
.
What is going on?
I recently upgraded to latest version of EE… so I tried uninstalling safecracker module since I thought maybe it was hijacking the form or posted vars somehow but that made no difference.
I am using EE v2.3.1 - Build: date 20111017. LAMP server config - PHP Version 5.3.6
Anyone have any ideas?