More Interstitials

The interstitial page is almost completed. We got the Add Drink page to concatenate the drink name and liquids into separate arrays in the $GET array. Now we are trying to get the glass sizes (default and overall possible glasses) to become concatenated into the array from the interstitial pages. We have one interstitial that works and adds the default glass to the URL for GET method, but we need a second interstitial to pop up immediately afterwards so that the user can select which glasses can be used to make the drink in. This second page is what we are stuck on right now. It won’t concatenate and continue onto the configuration page.

We’re going to get the database query formed up as soon as the interstitial passes to the configuration page. We’re all thinking it should take very little time to get the data passed into the database once we get the $GET array completely formed. The array accessing will look something like this:


//$_POST['drinkName']
$name = $_POST['drinkName'];


//$_POST['liquid']
$liquidArray = $_POST['liquid'];

//$size = sizeof($liquidArray);
for($i=0; $i<16; $i++)
{
if(isset($liquidArray[$i]))
{
//amount stored in this index is the amount for the index $i
//echo "Liquid ID " . $i . " is " . $liquidArray[$i] . " percent of the drink";
}
}

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*