Welcome Guest, Not a member yet? Register   Sign In
form_error issue
#1

[eluser]Gerep[/eluser]
Hi guys...


I have a form like this one:

Code:
<form action="cliente/alterar" method="post">
<input type="text" name="nome" value="" />
<?php echo form_error("nome");?>
</form>

I'm showing errors individually. They work at the first submit only. When I submit the form, CI adds the same controler and method to my url again, i.e:

My url first submit:
Code:
http://localhost/site/cliente/alterar

My url second submit:
Code:
http://localhost/site/cliente/cliente/alterar

And the form_validation doesn't work.

Thanks in advance.
#2

[eluser]Cristian Gilè[/eluser]
Could you post the controller code?


Cristian Gilè
#3

[eluser]smilie[/eluser]
Do not know if this is only / best solution, but:

Code:
<form action="<?=base_url();?>/cliente/alterar" method="post">

Cheers,
Smilie
#4

[eluser]Gerep[/eluser]
smilie's solution worked perfeclty =)

Thanks for yout time and attention guys....
#5

[eluser]InsiteFX[/eluser]
Also check out the form_helper.

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB