?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?php multi dropdown list
Author:??(203.177.46.---)
Date:???02-18-04 21:04

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 ]

[SubmitButton]
==========
Pls help

?Re: php multi dropdown list
Author:??(---.ym.rnc.net.cable.rogers.com)
Date:???02-19-04 15:57

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

Go to Top??|??Go to Topic??|??Threaded View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??

Provided By
Phorum