【发布时间】:2013-11-26 14:22:49
【问题描述】:
我在 javascript 中找到了很多方法,但我需要在 php 脚本中间调用 smack。
<form action="" method="POST" target='popup' onsubmit="window.open('','popup','width=700,height=400,left=200,top=200,scrollbars=1')">
Send a message : <input type="text" name="twitmessage"><br>
<input type="checkbox" name="twitter" value="My Posting Text">Would you like to send to Twitter?<br>
<input type="checkbox" name="facebook" value="Stuff to Post to facebook">Would you like to post to Facebook?<br>
<input type="submit" name="submit_cycle" value="Submit">
</form>
<?php
session_start();
// store session data
$_SESSION['twitmessage'] = $_POST['twitmessage'];
if(isset($_POST['submit_cycle'])) {
if($_POST['twitter']){
header("location: ../index.php?p=members");
}
if($_POST['facebook']){
header("location: ../index.php?p=paybill");
}else{
echo "Something bad happened";
}
}
?>
【问题讨论】:
-
“重定向到弹出窗口”是什么意思?
-
需要更好地解释您的问题...目前没有一点意义
标签: javascript php html api twitter