请帮助,我有一个简单的网络表单,当按下提交按钮时,我希望表单将数据发布到两个URL,同时立即重定向到其中一个。
这是我在表单提交后在php重定向页面上设置的内容。如何成功添加第二个URL并重定向到其中一个?
<? $aff = $_GET['aff'] ; $click_id = $_GET['click_id'] ; $email = $_GET['from']; $fname = $_GET['name_(awf_first)']; $lname = $_GET['name_(awf_last)']; $zipcode = $_GET['custom_zipcode']; $address = $_GET['custom_address']; $phone = $_GET['custom_phone_number']; $state = $_GET['custom_state']; $city = $_GET['custom_city']; $subid = $_GET['meta_adtracking'] ; $cblink = $_GET['cblink']; $keyword = $_GET['keyword'] ; $keyword = eregi_replace('[^a-z0-9 ]', '2', $keyword); ?> <META HTTP-EQUIV="refresh" CONTENT=0;URL="http://ian.smileymedia.com/r2/?placementID=shopper&email=<?print $email?>&fname=<?print $fname?>&lname=<?print $lname?>&state=<?print $state?>&zip=<?print $zipcode?>&hphone=<?print $phone?>&mphone=<?print $phone?>&country=US&pubSubID=<?print $subid?>&city=<?print $city?>&addr=<?print $address?>">
<html>
<body>
</body></html>
答案 0 :(得分:-1)
尝试使用这样:
<form onsubmit="submit();return false;">
.....
</form>
的javascript:
function submit()
{
var form = document.getElementById('formName');
using ajax - see http://en.wikipedia.org/wiki/XMLHttpRequest
return form.submit();
}