Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/245.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 搜索框将输入发送到新页面上的iframe url_Php_Wordpress_Iframe - Fatal编程技术网

Php 搜索框将输入发送到新页面上的iframe url

Php 搜索框将输入发送到新页面上的iframe url,php,wordpress,iframe,Php,Wordpress,Iframe,我想有一个搜索框,其中一个人键入一个数字,表单打开一个新页面,其中有一个iframe,iframe的url是 这可能吗?我将wordpress与php/mysql/apache/linux结合使用,如果这有助于回答我的问题的话。谢谢 <form action="http://othersite.com/results.php?id=numbersblahblah" method="post" target="_blank"> <!-- form fields here

我想有一个搜索框,其中一个人键入一个数字,表单打开一个新页面,其中有一个iframe,iframe的url是

这可能吗?我将wordpress与php/mysql/apache/linux结合使用,如果这有助于回答我的问题的话。谢谢


<form action="http://othersite.com/results.php?id=numbersblahblah" method="post" target="_blank">
    <!-- form fields here -->
    <input type="submit" value="Search" />
</form>

iframe将位于我自己网站的不同页面上。据我所知,您可以在同一页面上发布到iframe,但不能在其他页面上发布。要解决这个问题,您可以使用
$(this.serialize())在post上序列化表单;“,将其附加到表单的
action`中,然后在另一端取消序列化并创建一个iframe元素,然后将其附加到主体中……但它确实非常非常凌乱。你确定没有其他更干净的解决方案吗?:)类似的事情吗?抱歉,我对编程非常陌生。