hi
i wanna create a web page in such a way that, if a user gives a data in a text field,And click the submit button, it should automatically store in a drop down menu options...
pls help me in devloping the code for this.....
Thanks
Nawab
hi
i wanna create a web page in such a way that, if a user gives a data in a text field,And click the submit button, it should automatically store in a drop down menu options...
pls help me in devloping the code for this.....
Thanks
Nawab
You can do this in 2 ways. One, to store whatever the user enters in text box in a table and then get the records from the table and use it in drop down list. The second method, which is a temporary method, is to have a session array variable, which stores the values of the text entered by the user in the textbox. Then, loop through the array and use it in dropdown list. As I said, this is only a temporary solution.
Btw, you can also use javascript to do the same. Here is the link.
http://www.w3schools.com/htmldom/met_select_add.asp
Also in the past, I have seen this question a few times and a popular answer seems to be Ajax. Although I don't know the first thing about using Ajax, I believe it is ment to be able to read your mysql databases from the client side. From memory lane that is how I think it went but would have to do some research.
And of course there is always the option of putting the menus in iframes so that when one menu is submitted, the individual iframe is reloaded but wouldn't have a good SEO (Search Engine Optimisation).
Hope that helps.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.