Hi,
how can i add value of textbox in listbox in php. I have a textfield and want to type information in the textbox and after enter or submit add the value in a listbox, clear the textbox, and again type information in the textbox and add the value again in de listbox and so on in a loop for about 10/24 times. So the listbox is growing with all the values I entered in the textbox. And if it can all in the same php-page.
I am a novice to php so maybe someone can help me with a php-script that can do this.
Thanx in advance,
Amthree
how can i add value of textbox in listbox in php
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
You will either be using sessions or dynamically generating hidden input tags with the value information to update the list box.
If you want more help, please ask specific questions. It helps us if you post your code too.
If you want more help, please ask specific questions. It helps us if you post your code too.
-
Mohit_Prog
- Forum Commoner
- Posts: 26
- Joined: Mon Apr 23, 2007 6:10 am
in the lostfocus event of a textbox, fire the submit action of the form. submit the form to itself( i mean same page) .
now fetch the request from a textbox parameter and store in some variable say $test.
your listbox should be filled such a way that if $test contains something then assign it to a listbox.
try this. if still not clear then ask some specific question from this reply.
now fetch the request from a textbox parameter and store in some variable say $test.
your listbox should be filled such a way that if $test contains something then assign it to a listbox.
try this. if still not clear then ask some specific question from this reply.