say for instance i have the following method
public function admin_edit($id = null)
{
if(isset($_POST['name']))
{
$this->redirect('/Organizations/admin_index');
}
$this->set(array('org'=>$this->getModel('Organization')->find($id)));
$this->setLayout('admin_layout');
}
Now i wish to call this function and set the $id variable = to 1
so in HTML i create the following link:
<a class="btn btn-info" href="/Organizations/admin_edit?id=1">Edit</a>
However this only creates a $_GET variable called id and sets it to 1
Is there a way to call functions where you set the parameter in the link?
$obj->admin_edit($_GET['id']);