Adding <select> Items to Cart
I have An Item Select Page where Training Packages can be purchased for a specified player.
The Player is selected from a recordset filtered by the User's ID, and chosen by a <select> and Dynamic <option> form> (Code follows)
*****************************************************************************************
<form id="playerSelect" name="playerSelect" style="margin:10px 100px;">
<fieldset title="">
<select name="Player" id="Player">
<option value=0>Select a Player to Sign Up</option>
<?php
// RepeatSelectionCounter_1 Begin Loop
$RepeatSelectionCounter_1_IterationsRemaining = $RepeatSelectionCounter_1_Iterations;
while($RepeatSelectionCounter_1_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_1 || $row_myPlayers){
?> <option value="<?php echo $row_myPlayers['id']; ?>"><?php echo $row_myPlayers['playerFirstName']." ".$row_myPlayers['playerLastName']; ?></option>
<?php
} // RepeatSelectionCounter_1 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_1 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_1 && $RepeatSelectionCounter_1_IterationsRemaining != 0){
if(!$row_myPlayers && $RepeatSelectionCounter_1_Iterations == -1){$RepeatSelectionCounter_1_IterationsRemaining = 0;}
$row_myPlayers = mysql_fetch_assoc($myPlayers);
}
$RepeatSelectionCounter_1++;
} // RepeatSelectionCounter_1 End Loop
?>
</select><br><br><br>
</fieldset>
</form>
***********************************************************************'
Then a second Form is revealed, with a <select> and Dynamic <option> providing a list of available packages
************************************************************************
<form id="TrainSelect" name="TrainSelect" style="margin:10px 100px;">
<fieldset>
<select name="TO" id-"TO">
<option>Select a Training Option</option>
<?php
// RepeatSelectionCounter_2 Begin Loop
$RepeatSelectionCounter_2_IterationsRemaining = $RepeatSelectionCounter_2_Iterations;
while($RepeatSelectionCounter_2_IterationsRemaining--){
if($RepeatSelectionCounterBasedLooping_2 || $row_trainingOptions){
?>
<option value="<?php echo $row_trainingOptions['ProductID']; ?>" alt="<?php echo $row_trainingOptions['ProductLongDesc']; ?>" title="<?php echo $row_trainingOptions['ProductLongDesc']; ?>"><?php echo $row_trainingOptions['ProductShortDesc']; ?></option>
<?php
} // RepeatSelectionCounter_2 Begin Alternate Content
else{
?>
<?php } // RepeatSelectionCounter_2 End Alternate Content
if(!$RepeatSelectionCounterBasedLooping_2 && $RepeatSelectionCounter_2_IterationsRemaining != 0){
if(!$row_trainingOptions && $RepeatSelectionCounter_2_Iterations == -1){$RepeatSelectionCounter_2_IterationsRemaining = 0;}
$row_trainingOptions = mysql_fetch_assoc($trainingOptions);
}
$RepeatSelectionCounter_2++;
} // RepeatSelectionCounter_2 End Loop
?>
</select>
</fieldset>
</form>
***************************************************************
What is the best way to bind the information from these two drop-downs to the PlayerID and ItemID in the cart Object??
Thanks,
Mike