Can a form submit handler return results without using the $_GET array? It looks like the default method for passing the result of handling a form submit is GET.

The following statement will redirect to form/result, where a page callback function will extract $content (the result form processing the form) from the query string (attached to the URL) using the $_GET array:

$form_state['redirect'] = array('form/result', array('query' =&gt; array('text' =&gt; $content)));


This works, but I do not want $content to be a query string (where it can be edited by the user).

Is there an alternative method (e.g. POST) for passing the value of $content to the page callback?
You can save $content in a session variable, and then redirect the users to a new page. The page callback of that page will then extract the data from the session data.

$_SESSION['mymodule_content'] = $content;
$form_state['redirect'] = 'form/result';




// The page callback then will execute the following code.
$content = $_SESSION['mymodule_content'];


The pros of using session data are:


There isn't the length limit GET data has
The data will not be visible in the browser address bar
The data can be complex like an array, or an object