[eluser]julien.1486[/eluser]
Hi everybody !
I have some problems with the structure of my website.
Sometimes I need to display a form by using a link with a parameter (ex anchor('edit_news/'.$news->id, $news->title).
The "action" field of my form is "edit_news" too, but all parameters are transmitted by the FORM way.
And I get an error because my controller's function look like this :
function edit_news(news_id){
blablabla...
}
And when the form is submitted, there is no news_id in the URI.
There is an other way : change the "action" field to something like "edit_news_proceed" and create a new function which deal with de form validation. The first link is still like 'edit_news/'.$news->id and the edit_news function just deals with populating the form's fields with the correct values.
But there is a problem too because in my form I call the method "validation_errors();" and the library "form_validation" is not loaded by the first function (edit_news).
Do you have any solution ?
Excuse my language, I'm french