views:

35

answers:

1

Hi,

I have strange problem. When I submit form, the whole web site redirects to index. Form method is post. When I change it to get, everything goes right. So what is the problem ?

Form code:

<form action="<?php echo $this->baseUrl('/search/general'); ?>" method="post">
  <table class="wf">
    <tr>
      <td>
        <a href="#" onclick="$('#general_search').submit(); return false;">
          <img src="<?php echo $this->baseUrl('images/dec/search-left.gif'); ?>" style="width: 18px; height: 20px;" alt="" />
        </a>
      </td>
      <td class="input-text">
      <input type="text" name="general_search_query" id="general_search_query" value="" />
      </td>
      <td>
      <a href="#" title="" onclick="$('#general_search_query').val(''); return false;">
          <img src="<?php echo $this->baseUrl('images/dec/search-right.gif'); ?>" style="width: 15px; height: 20px;" alt="" />
       </a>
       <input type="submit" name="submit" value="x" />
      </td>
    </tr>
  </table>
</form>         

Search controller general method:

public function generalAction(){
  //empty
}

And general.phtml code:

print_r($_POST);

With other forms in site everything is ok. But this one, just wrong. Any hints?

Your help would be appreciated.

A: 

try check your params in action:

Zend_Debug::dump($this->getRequest()->getParams());

Iscander