form validation - 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: form validation (/showthread.php?tid=30368) |
form validation - El Forum - 05-12-2010 [eluser]pam81[/eluser] Hi, i'm using form validation in a login form it works ok but i have problems with the url first time when form is no valid i see this http://127.0.0.1/cartanatal/index.php/login/validate the second time http://127.0.0.1/cartanatal/index.php/login/login/validate the tirhd time http://127.0.0.1/cartanatal/index.php/login/login/login/validate all the time it add another "login" to the url here is the code of the controller wich is call from the form. I would like too know if there is another way to use form validation Thanks in advance! Code: class Login extends Controller { form validation - El Forum - 05-12-2010 [eluser]n0xie[/eluser] It has most likely to do with your view. Show us the adm/loginform_view. form validation - El Forum - 05-12-2010 [eluser]pam81[/eluser] My view is basically a form i add the validation_errors to show the errors Code: <?php echo validation_errors(); ?> form validation - El Forum - 05-12-2010 [eluser]n0xie[/eluser] [quote author="pam81" date="1273705801"] Code: <form method="post" name="loginform" action="login/validate"> This is where it goes wrong. Either use the URL helper and use site_url, use the form helper and use form_open(), or add a slash at the beginning. Since you're not stating that it should look at the root of your webserver folder, it appends login to your uri. form validation - El Forum - 05-12-2010 [eluser]pam81[/eluser] Thanks so much!!! It was the error. Now it works fine. I put site_url before the address. |