Ok, so I read the forums and came up with this php page to take the info from previous pages and submit it to the cart. The php page before it asks the last questions and sends all the data to this page which is not seen by the user. It seemed to work perfectly the first time; there was a slight delay as it ran the scripts, then it come to the correct product page saying "successfully added to cart!" I think I'm awesome. Then I click view cart. It's empty. I would appreciate any help other than, "send user to product page and have them choose attributes and add to cart from there." They need to be able to use the graphical site with full instructions on customization before it's added to the cart. Also, I realize some users don't have javascript to begin with. Here's my code.
<?php
$font=$_GET['font'];
$thread=$_GET['thread'];
$text=$_GET['text'];
$instructions=$_GET['instructions'];
switch ($font)
{
case AKAFrivolity:
$f="16";
break;
case BoyzRGross:
$f="10";
break;
case CurlzMT:
$f="11";
break;
case GirlsAreWeird:
$f="12";
break;
case KristenITC:
$f="13";
break;
case PoorRichard:
$f="14";
break;
case TinkerToy:
$f="15";
break;
case Zachary:
$f="17";
break;
default:
header( 'Location: cart/' );
}
switch ($thread)
{
case red:
$t="2";
break;
case black:
$t="3";
break;
case babyblue:
$t="4";
break;
case babypink:
$t="5";
break;
case brown:
$t="6";
break;
case bubblegumpink:
$t="7";
break;
case white:
$t="8";
break;
case blue:
$t="1";
break;
case limegreen:
$t="9";
break;
default:
header( 'Location: cart/' );
}
?>
<form id="form_1" action="cart/index.php?main_page=product_info&cPath=7&products_id=1&number_of_upl oads=0&action=add_product" method="POST">
<input type="hidden" name="id[1]" value="<? echo $f; ?>" id="attrib-1" />
<input type="hidden" name="id[2]" value="<? echo $t; ?>" id="attrib-2" />
<input type="hidden" name="id[txt_3]" value="<? echo $text; ?>" id="attrib-3-0" />
<input type="hidden" name="id[txt_4]" value="<? echo $instructions; ?>" id="attrib-4-0" />
</form>
<script type="text/JavaScript">
function Submit(form){
document.getElementById(form).submit();
}
Submit('form_1');
</script>



