I dont know if PHP can do this.
This is what im trying to work. the initial page has already have a one line of drop dowlist and when i click the Submit button the page refesh and add another dropdown list but the value i have selected earlier on the list is not erase. until the max of 10 drop downlist.
sample of Initial Page:
Form:
Item: [ drop downlist ] Price: [ textbox ]
(SubmitButton)
--------------------
Now when i select and click submit the page will be:
Item: [ Paper ] Price: [ 50.00 ]
Item: [ drop downlist ] Price: [ text ]
[SubmitButton]
~~~~~~~~~~~
And when I Submit Again:
Item: [ Paper ] Price: [ 50.00 ]
Item: [ Pen ] Price: [ 5.00 ]
Item: [ drop downlist ] Price: [ text ]
to keep you values alive, place each in a variable when submitting and then set them as selected when rebuilding the form
here is the code to keep them alive
$items can be an array or a database call dataset
$item is the item choosen by the last go around - this is for one item....to use this for a list of items either change the name for each item or use an array
$num_elements=count($items);
for($x=0;$x<$num_elements;$x++){
if ($myItem==$items[$x]){
echo "";
}else{
echo "";
}//close if then
}//close for loop