html表单无法提交并返回同一页面

时间:2013-09-29 13:12:35

标签: php html

我在下面有此表单,用于提交到支付网关。问题是,一旦我点击按钮,它就不会进入第三方付款页面。但是,如果我第二次点击,那么它只能通过?为什么会这样?

<form method="post" action="" name="payment">
<input type="submit" name="submit"/>
</form>


function PAYMENT_FORM($price, $username, $useremail, $usercontact, $desc, $desc2){
      //Content of the function 
}

if (isset($_POST['submit'])) {
    echo PAYMENT_FORM($cart->total, $user['firstname']." ".$user['lastname'], $user['email'], $user['telephone'], $desc, $desc2);
}

0 个答案:

没有答案