Welcome Guest, Not a member yet? Register   Sign In
validate upload in edit module and how show the errors about the uploading data
#1

[eluser]Asinox[/eluser]
Hi,
Please i need to know how show the error in editing data...

for example, the url : http://domain/index.php/site/editing/3

If the form fields are empty the normal way is redirecting to the view with the form... but somebody hav a nice way to redirect to the view and show the errors?, i know that ill make something like that: redirect($this->uri->uri_string(),'location'), but i cant see the errors msg's.

i need to know if there's nice way to do that.



thanks u all
#2

[eluser]Crimp[/eluser]
The Form_validation class does this. You use the function form_error('[name of field']) to display the individual error or validation_errors() to display all errors. The Form helper can be handy if there are a lot of forms to do.
#3

[eluser]Asinox[/eluser]
hi, ok, maybe i said something wrong

i know how validate form's, but my problem is when i want to validate form in editing mode, because the validation is running in the function where i save the new data, Example:

Code:
<form action="controller/insert_edited_data">

form_hidden('id',$row['id']);

</form>

the funcion "insert_edited_data" update the data , but if i try to validate the data i don't know how go back
to the "editing view" with the "ID" in the URL and show the msg's about validation.


im sorry with my English...

is more or less clear?

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB