![]() |
Pls help me! Why I can't update database!? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Pls help me! Why I can't update database!? (/showthread.php?tid=5530) |
Pls help me! Why I can't update database!? - El Forum - 01-25-2008 [eluser]Old Tam[/eluser] Here is the Controller :ecms.php Code: <?php Here is the View:product_edit.php Code: <html> Pls help me! Why I can't update database!? - El Forum - 01-25-2008 [eluser]wiredesignz[/eluser] Just a quick guess. uri->segment(3) looks empty, form action has no 3rd segment. Pls help me! Why I can't update database!? - El Forum - 01-25-2008 [eluser]Old Tam[/eluser] [quote author="wiredesignz" date="1201324003"]Just a quick guess. uri->segment(3) looks empty, form action has no 3rd segment.[/quote] thank you very much! But The uri->segment(3) is not empty,it contain in the url of the page 'product_edit.php' the code has no error,but,it can't update the datebase,How can I do!? Pls Help me! Pls help me! Why I can't update database!? - El Forum - 01-25-2008 [eluser]wiredesignz[/eluser] Your form is not passing the `id` value to the product_update method. Unless `id` == 'product_update'. Good luck. ![]() Pls help me! Why I can't update database!? - El Forum - 01-26-2008 [eluser]Old Tam[/eluser] [quote author="wiredesignz" date="1201341523"]Your form is not passing the `id` value to the product_update method. Unless `id` == 'product_update'. Good luck. ![]() Thank you ![]() I put the code $this->uri->segment(3) in the form_hidden function of the view "product_edit.php" . It can update now! Thank you for your help!thank you! Pls help me! Why I can't update database!? - El Forum - 07-17-2009 [eluser]crispinatari[/eluser] [quote author="Old Tam" date="1201370074"][quote author="wiredesignz" date="1201341523"]Your form is not passing the `id` value to the product_update method. Unless `id` == 'product_update'. Good luck. ![]() Thank you ![]() I put the code $this->uri->segment(3) in the form_hidden function of the view "product_edit.php" . It can update now! Thank you for your help!thank you![/quote] Hi Tam! can you please show your working code of the view and controller now that it works and how you set out the code because i'm having a similar issue with updating that won work, but i think it may also be an sql error for me, though i'm not sure. |