Welcome Guest, Not a member yet? Register   Sign In
$this->load->view problem
#1

[eluser]Mitja[/eluser]
Code:
if ($this->validation->run() == FALSE)
{
$this->load->view('admin/arrangements_edit/'.$id, $data);
}
else

how can i load view of arrangements_edit.php file when i need a id. If i try like this it said that file admin/arrangements_edit/1.php does not exist
#2

[eluser]einstein[/eluser]
you need to pass the $id in the url and get it with $this->uri->segment(2) if the id is the 2 second segement.
You need to load the arrangements_edit whiout this: "/'$id".

Hope this helps
#3

[eluser]Michael Wales[/eluser]
I think you have a misunderstanding in what you are actually trying to accomplish. I simply can't imagine you are going to create a unique view for each and every item that has an ID...

Could you explain what you are attempting so we can point you in the right direction?
#4

[eluser]steel_slasher[/eluser]
@michael
i think i understand what he is saying he seems to have mixed up the view with the controller

@mitja
the id will be in the url for example www.domain.com/admin/arrangements_edit/1
the controller "admin" will run the function "admin" and pass the id to the function the function will then load the view and send the data regarding the user with the id "1"




Theme © iAndrew 2016 - Forum software by © MyBB