There is a standard query, type

$.post('my_url',{'var1':'value1','var2':'value2'},function(data){ //обработка даты } 

And the standard function that catches this thing:

 function myfunc(){ if(!empty($_POST['var1'])){ //обработка поста } } 

Callback Announced:

 $items['my_url'] = array( 'page callback' => 'myfunc', 'access callback' => true, 'type' => MENU_CALLBACK ); 

Question: how can the non-orthodox $_POST rewritten through the orthodox $form_state ? The post comes, the form state is obviously empty: there is no corresponding form.

    1 answer 1

     filter_xss(trim($_POST['var1'])) 

    to help me. And the post will immediately become Orthodox.