[eluser]jonny68[/eluser]
Hi,
i'm building an e-shop and i'm facing a little problem:
i have in the view:
(this is a link)
Code:
site_url('cart/remove_item/'.$cartkey);
pointing at cart controller function remove_item
Code:
function remove_item($key)
{
//here i do things only with $key..
}
My need is that the link takes another parameter to take to the function
but only if it is set, and the function takes that parameter only if it is set as well.
I try to explain, something like:
Code:
site_url('cart/remove_item/'.$cartkey,(isset($myvar)) && $myvar));
Code:
function remove_item($key,(isset($myvar)) && $myvar))
{
//here i do things with $key and $myvar too..
}
I'm i clear enough?
Hope so an thanks in advance!