表单提交结果后,用php代码打开新窗口 [英] open new window with php code after form submits results

查看:174
本文介绍了表单提交结果后,用php代码打开新窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是我一直在处理的脚本,它应该在打开时集成用户和传递

 < php 

$ name = $ _POST ['name']; //包含人的名字
$ pass = $ _POST ['pass']; //发件人的电子邮件地址
$ link = window.open(https://secure.brosix.com/webclient/?nid=4444&user=$name&pass=$pass&hideparams=1'width = 710,高度= 555,左= 160,顶部= 170' );

echo $ link;

?>

我是这样做的,我想在用户提交表单之后打开一个弹出窗口PHP代码,但我总是得到一个错误。

解决方案

更改您的代码到这个

 <?php 

$ name = $ _POST ['name']; //包含人的名字
$ pass = $ _POST ['pass']; //发件人的电子邮件地址
$ link =< script> window.open('https://secure.brosix.com/webclient/?nid = 4510& user = $ name& pass = $ pass& hideparams = 1','width = 710,height = 555,left = 160,top = 170')< / script>;

echo $ link;

?>

其他注意

您应该考虑使用 fancybox ,它可以在使用iframe的弹出窗口中加载整个网页。还有其他的选择,以及随时探索!


here is the script that i been working on , it is supposed to integrate user and pass when opened

<?php

$name = $_POST['name']; // contain name of person
$pass = $_POST['pass']; // Email address of sender 
$link = window.open(https://secure.brosix.com/webclient/?nid=4444&user=$name&pass=$pass&hideparams=1 'width=710,height=555,left=160,top=170');

echo $link;

?>

am i doing this right, i want to open a pop up windows after the user submits the form to the php code but i always get an error.

解决方案

Change your code to this

<?php

$name = $_POST['name']; // contain name of person
$pass = $_POST['pass']; // Email address of sender 
$link = "<script>window.open('https://secure.brosix.com/webclient/?    nid=4510&user=$name&pass=$pass&hideparams=1', 'width=710,height=555,left=160,top=170')</script>";

echo $link;

?>

Additional Note

You should consider using fancybox which can load webpages as a whole in a popup window using iframes. There are other options as well feel free to explore!

这篇关于表单提交结果后,用php代码打开新窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆