implode function not working
Posted: Fri Oct 03, 2008 9:26 am
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hello,
I am trying to combine multiple values in a string to be submitted to a shopping cart. However, I can only get one of the two values to pass through to the cart. Any suggestions? Thanks in advance!
~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
Hello,
I am trying to combine multiple values in a string to be submitted to a shopping cart. However, I can only get one of the two values to pass through to the cart. Any suggestions? Thanks in advance!
Code: Select all
<?php
if(isset($_POST['part'])) {
$checkbox = $_POST['part'];
$string = implode("^",$checkbox);
echo $string;
}
?>Code: Select all
<form name='CartItem' action='https://www.ram-mount.com/RamCart/CartPutItem.php' method='POST'>
<input type='checkbox' name='part' value='RAM-VB-162'>
<input type='checkbox' name='part' value='RAM-VB-154'>
<input type='submit' value='Add To Cart'>
</form>~pickle | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: