最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

forms - post request does not redirect but why

programmeradmin2浏览0评论

I have a php file, let's call it form.php . It's embedded in wordpress as a code block. The form is as below.

<FORM NAME="entitynames" method='POST' id='entity_form'>
<INPUT method='text' name='entity' style='width:20em' >
<INPUT type="submit" value="Submit" >
</FORM>

It's working as expected, calling the form.php with $_SERVER['REQUEST_METHOD'] == 'POST'and embedding the results in the wordpress container. My question is this expected behavior? I thought I would have to use ajax to prevent the page from being redirected to form.php. Why is the results of form.php showing up in the container?

发布评论

评论列表(0)

  1. 暂无评论