![]() |
[SOLVED] form validation problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: [SOLVED] form validation problem (/showthread.php?tid=29482) |
[SOLVED] form validation problem - El Forum - 04-11-2010 [eluser]Lord_Jago[/eluser] Hi everybody, I have a problem while validating my form. In my config file, the uri_protocol is set to AUTO. When I try to submit my form, the URL becomes something like http://www.toto.fr/index.php/nodes/edit/4?title=&teaser;=&ntype;=&submit=Sauvegarder, the validation errors are not displayed and my form is not validated. I don't see what's wrong... By the way, I use datamapper. Any ideas ? (Sorry if my English is not perfect) The form : Code: <?php echo validation_errors(); ?> The controller : Code: class Nodes extends Controller { [SOLVED] form validation problem - El Forum - 04-11-2010 [eluser]adamp1[/eluser] By default if you don't specify a method for a form to use it will use GET. For this reason I would use the CodeIgniter Form helper to create your forms. Code: print form_open('nodes/edit/' . $node_id); Or just change your code to read Code: <form action="<?php echo site_url("nodes/edit/$node_id");?>" action="POST"/> [SOLVED] form validation problem - El Forum - 04-11-2010 [eluser]Lord_Jago[/eluser] Thank you very much adamp1 !! I feel so stupid... It was Code: <form action="<?php echo site_url("nodes/edit/$node_id");?>" method="POST"/> Problem solved ! |