how to save the data from the listbox to the database |
[eluser]basty_dread[/eluser]
I have this listbox and the data from my listbox is from the database. i already have the code for customizing the order of each data. what i need is to save these data that i customize the order. how could i save it to the database? any one please help me. Thank you very much,,
[eluser]basty_dread[/eluser]
Please help me on my project.. thank you very much.. Im a newbie in CI
[eluser]Thorpe Obazee[/eluser]
It's really difficult to help you. You should probably explain better.
[eluser]basty_dread[/eluser]
Im sorry if i did not explain it clearly. i have a listbox. and it's values are fetched from the database so this is how it will look like: listbox name="list" ____________________ one ____________________| <---- this values are from the database family tree ____________________| ampster is amps ____________________| what i want is to POST all the values on the listbox to the next page. what should i do so that i could get all the values and insert them to the database. Any one please help me please.. Thank you.
[eluser]basty_dread[/eluser]
any one please help me? is there any way like that?
[eluser]Thorpe Obazee[/eluser]
Listbox is the same as Code: <SELECT NAME=sections MULTIPLE> Right? I believe you have to select all the values and then submit the form then save using this: http://ellislab.com/codeigniter/user-gui...tml#insert
[eluser]khagendra[/eluser]
Will you please put your code detail. :question: However go through this link, it will help u to understand. Code: http://ellislab.com/forums/viewthread/133105/#656950
[eluser]basty_dread[/eluser]
i have to select all the values how could that be possible? using a javascript? putting the values in an array is my problem as well.
[eluser]basty_dread[/eluser]
[quote author="bargainph" date="1256882939"]Listbox is the same as Code: <SELECT NAME=sections MULTIPLE> [/quote] it's not actually a multiple select. just this Code: <SELECT NAME=sections> how can i POST all of these values to my next page, so that i could insert these items on my database. thanks.
[eluser]khagendra[/eluser]
Here is modification of your view file v_example.php to submit all the selected values -- view (v_example.php) -- Code: <form action="<?=site_url('example/multiple')?>" method="post"> -- Controller (example.php) -- Code: class Example extends Controller { I have listed the selected values form the list. Hope this will help u Enjoy! :-) |
Welcome Guest, Not a member yet? Register Sign In |