I need your help.
How to pass array values in a query string ...
<?php
foreach ( $Cart->getItems() as $order_code=>$quantity ) :
$pname[]= $Cart->getItemName($order_code);
$item[]= $Cart->getItemPrice($order_code);
$qty[]=$quantity;
endforeach;
?>
<form action='expresscheckout.php?amt=<?php echo $total_price; ?>&item_name=<?php echo $pname; ?>&unit=<?php echo $item; ?>&quan=<?php echo $qty; ?>' METHOD='POST'>
<input type='image' name='submit' src='https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif' border='0' align='top' alt='Check out with PayPal'/>
</form>
This is my sample code., For the above code example, do I need to pass a query string at my action url, which is expresscheckout.php expression? amt = 100. etc., fall under $ pname [], $ clause [], $ pcs [].
Waiting for output in expresscheckout.php
expresscheckout.php? pname = product1, product2 & item = item1, item2 & qty = 1,2,3 .... like this ....
Thanks in Advance ....
source
share