PHP and Forms
Date: 10/04/05
(PHP Community) Keywords: php, java
I'm after a bit of help with a complex form i have on my site. I am aware that this may actually be a Javascript issue, but i'm only "advanced beginner" in PHP, so i'm not too sure. hopefully if i explain my goal, someone can pooint me in the right direction, or offer up some code :)
I have a form that has a row of drop-down menus, that when each one is selected and filled out, the variables should all amke up one long instruction. For example the first box might be numbers 1 to 10, the second box might be a list of fruit. by selecting the number (say 3) and then the fruit (say apples) '$var1 $var2' would eaqual '3 apples'. So, what i would like to happen is when a submit button is pressed, '$var1 $var2' is written to a textarea underneath the form, and '3 apples' would be shown in the textarea. But it doesn't end there! I'd also like the user to then be able to select another '$var1 $var2' combination, and upon submit have it add that underneath the first one in the textarea.
And as a final piece, pressing a second submit button underneath the textarea will pass the texarea variable onto the next page of the form (which i plan to store in a hidden var). I can kind of figure out this final part, but it all depends onhow the other stuff is done i guess.
I'm really hoping it isn't javascript, or at least not too much, heh. Any help or pointers? :)
please, and thanks! :)
paul.
Source: http://www.livejournal.com/community/php/349535.html