form validation |
[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/lo...n/validate the tirhd time http://127.0.0.1/cartanatal/index.php/lo...n/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 {
[eluser]n0xie[/eluser]
It has most likely to do with your view. Show us the adm/loginform_view.
[eluser]pam81[/eluser]
My view is basically a form i add the validation_errors to show the errors Code: <?php echo validation_errors(); ?>
[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.
[eluser]pam81[/eluser]
Thanks so much!!! It was the error. Now it works fine. I put site_url before the address. |
Welcome Guest, Not a member yet? Register Sign In |