form question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tonyledenko
Forum Newbie
Posts: 15
Joined: Thu Sep 11, 2008 4:22 pm

form question

Post by tonyledenko »

Hello, I would like the following to submit the values of one or both of the check boxes to a shopping cart. However it doesn't work.

Here is the link where the code resides:

http://www.ram-mount.com/wizards/test.php

Then it should populate this page, including the two parts:

https://www.ram-mount.com/RamCart/viewcart.php

If you can look at this page I have combined the two values and it works. However, this does not give the user a choice to pick one, two or both:

http://www.ram-mount.com/wizards/test.htm

<?php
$part = implode('^', $_POST['part']);
?>
<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>

Thanks in advance
Post Reply