Welcome Guest, Not a member yet? Register   Sign In
how to create a link with anchor command to a function with multiple parameters?
#1

[eluser]fs_xyz[/eluser]
Uhh, let's say I have a function with multiple parameter in a controller

Code:
function delete($master,$detail)
{
   $this->Mdetail->Mdetaildelete($detail);
   redirect('masterview/'.$master,'refresh');
}

But to access it, I do it from an anchor command like this

Code:
echo anchor('masterview/delete/'.$list['id_detail'],'delete');
// umm this line is the main focus here, can only fill 1 parameter...

The point is, I want to post 2 information to delete function. But I don't know how to do it with anchor command.
Or is there another alternative ? ( got used to parse information to single parameter function... )

Imagine it like having a view filled with master form and multiple details.
I want to delete one those details and then redirected back to the same view.
I will need 2 parameters here, 1 for id_detail so I can delete/edit it, and 1 for id_master so I can redirect back.
#2

[eluser]fs_xyz[/eluser]
Ack, nevermind this, tried using more segments actually work.

Sorry for bothering everyone. Sad




Theme © iAndrew 2016 - Forum software by © MyBB