This is really simple question for the user who are using DRUPAL for many years.But for me it is creating a big issue.
I already made a form using the drupal form api.But after submit the form I want to store form data in the "$_POST" and print the data to another module's page.I get the data on the 2nd page(module's page where I want to show the form data)when I store the data in $_SESSION or in $_GET array but not get result when I store data in $_POST.What is the proper way to store data in $_POST array and fetch the data in another page?
my submit code is as follows:
function create_kavings_create_form_submit($form, &$form_state) {
//print_r($_POST);die();
//$_POST['first_name'] = $form_state['values']['first'];
//$_POST['last_name'] = $form_state['values']['last'];
//$arr[]=$_POST;
$options = array(
'query' => array(
'first' => $_POST['first'],
'last' => $_POST['last'],
)
);
$form_state['redirect'] = array('coupon_preview',$options);
}
On 2nd page I simplly write the following to print the post array:
print_r($_POST);
But is showing blank.