I have a similar question. I have a listbox where a user selets what size tey wanna buy, say small, medium or large. My form posts that onto the next page just fine, here's the cde:
<form name="size" method="post" action="addtocart.php">
<select name=\"listbox\">\n";
foreach ($itemlist2 as $selectitem) {
echo
"<option value=\"$selectitem\">$selectitem</option>\n";
}
echo "</select>";
}
<input type=submit value='Add To Cart >'>
</form>
and then on the addtocart page:
$userchoice=$_POST['listbox'];
but addtocart.php is not an html page, it is a quick script that shoves all the product data into a table called cart on the database, and then loads the next page called cart.php which displays the contents of the shopping cart.
How do I forward value of $userchoice on to the cart.php page? Addtocart.php does not have any submit buttons or input devices since it is never 'seen' by the user... can I somehow do a form on addtocart.php with a hidden field only and somehow pass that onward?