在嵌入式php上调用POST操作的HTML

在嵌入式php上调用POST操作的HTML,php,html,phpbb,forums,Php,Html,Phpbb,Forums,我有一个HTML页面,通过iframe显示我的phpBB3论坛,如下所示: <iframe name="inlineframe" src="http://www.website.net/forums/index.php" frameborder="0" scrolling="auto" width="100%" height="1500" marginwidth="5" marginheight="5" ></iframe>. 。 我这样做是为了在论坛顶部

我有一个HTML页面,通过iframe显示我的phpBB3论坛,如下所示:

      <iframe name="inlineframe" src="http://www.website.net/forums/index.php" frameborder="0" scrolling="auto" width="100%" height="1500" marginwidth="5" marginheight="5" ></iframe>.
我这样做是为了在论坛顶部显示一个HTML编码的菜单栏

在另一个HTML页面(主页)上,我有一个带有输入字段的容器,允许您通过以下代码直接登录论坛:

      <form action="http://www.website.net/login.php?mode=login" method="post">
        <label for="username">Username</label><input type="text" name="username" required>
        <label for="password">Password</label><input type="password" name="password" required>
        <input type="submit" name="login" value="Login" class="loginbtn"/><a href="http://www.website.net/register.php">Register</a>
      </form>

用户名
密码
因此,如果用户在框中输入登录信息并点击提交,他们将直接从主页进入论坛并自动登录

当我将submit按钮直接链接到phpBB论坛(没有菜单栏)时,它可以正常工作,但当它嵌入(有菜单栏)时,它就不能正常工作


如果与嵌入式PHP链接(www.website.net/register.PHP)一起使用,浏览器只需将我带到登录页面,而无需输入提交的任何字段

最好的方法是修改论坛主题的标题模板并添加菜单栏,例如:

如果出于任何原因想避免这样做,我建议您应该在phpBB中添加一个重定向到您想要登录后的页面

查看root\ucp.php(phpBB 3.0.11)中的第76-81行


将其更改为带有IFrame的页面的URL,您应该会很好。

谢谢您的回复。我把菜单栏移到了论坛标题,现在一切都正常了。
if ($user->data['is_registered'])
{
    redirect(append_sid("{$phpbb_root_path}index.$phpEx"));
}

login_box(request_var('redirect', "index.$phpEx"));