Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- for loops with select option


jd01 - 6:55 am on Oct 6, 2009 (gmt 0)


This section of code:

for($i=0; $i<$value; $i++)
{
$PackTye = $_POST["packTy"][$i];
echo '.$PackTye.';
}

Only stores the value of $PactTye as of the last iteration of the loop, not all iterations, so if it has something to do with the function: selectProduction you can expect to only get the last value passed... (IOW Your current code has the value of $PackTye set to change every time through the for loop and finally ends up at the last value passed by the POST, which appears to be F.)

for($i=0; $i<$value; $i++)
{
$PackTye[$i] = $_POST["packTy"][$i];
echo '.$PackTye.';
}

Would probably work better for you.
Then you can reference $PackTye[NUMBER] for your outputs.


Thread source:: http://www.webmasterworld.com/php/4001916.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com