通过不转到另一页提交表单

时间:2015-09-22 18:07:06

标签: php

switch($form_submit) { case "Paypal": header("Location: edADHJASHDIJHashiuas39wed9jsdcud.php"); break; case "eway": header("Location: pay_eway.php"); break; default: echo '<script>window.location="pay_eway.php";</script>';} 

我在我的文件中有这个代码(checkout.php) 现在我不想转到这个页面(edADHJASHDIJHashiuas39wed9jsdcud.php)。并通过这个提交我的vaalues。 这个页面(edADHJASHDIJHashiuas39wed9jsdcud.php)包含这个

    <body>

<section class="trampoline-products">
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">

 <input type="hidden" name="cmd" value="_xclick">
 <input type="hidden" name="business" value="taranayadav@gmail.com">
 <input type="hidden" name="currency_code" value="AUD">
 <input type="hidden" name="first_name" value="<?php echo $usrDet['fname'];?>">
 <input type="hidden" name="last_name" value="<?php echo $usrDet['lname'];?>">
 <input type="hidden" name="state" value="<?php echo $usrDet['state'];?>">
 <input type="hidden" name="zip" value="<?php echo $usrDet['pcode'];?>">
 <input type="hidden" name="email" value="<?php echo $usrDet['email'];?>" data-type="email">
 <input type="hidden" name="phone" value="<?php echo $usrDet['phone'];?>">
 <input type="hidden" name="item_name" value="Tara Trampolines Payment">
<input name="item_number" type="hidden" value="<?php echo $orderDet['id'];?>" />
 <input type="hidden" name="return" value="http://www.oyasisspring.com/tara/success_paypal.php">
 <input type="hidden" name="amount" value="<?php echo $orderDet['order_total'];?>">
                        <script type="text/javascript">document.forms[0].submit();</script>tion 6 End -->
</form>
</section>
</body>

0 个答案:

没有答案