POST不能正常工作


POST doesnt work correctly

我有一个代码在tpl:

   <form action="build.php?id={id}" method="post">
   <input width="80" type='submit' height='20' value='{uzsakyti_svente}' name='uzsakyti1'>
   </form>

当我按下按钮时,动作会自动进行,当动作结束时页面刷新,firefox弹出窗口跳出来让我选择重载页面和取消页面,现在这是我不想要的问题,我想要的是,当动作完成时,页面只是刷新,但firefox表格或其他浏览器的表格不会出来,现在有什么办法吗?

如果捕获Post请求,在build.php文件中重定向到您的页面:

if (! empty( $_POST))
{
   // Update or insert your data in DB or whatever ...
   if ($data_ok)
   {
       header( 'HTTP/1.1 303 See Other' );
       // You can add a param to display in your view that the form was posted
       header( 'Location: http://domain.com/build.php?posted=1' );
       exit();
   }
}
// Your main code goes here ...