I am trying to call the form_open function and pass a value to the function it's calling. I'm trying to pass the value for $data->advisee_id. Once it calls the setAdvisees function I want it to echo the value. I've tried a number of things and I'm thinking I might need to pass it into the array which is the second parameter for form open. Does anyone know how I would do this? The below code I have currently gives an error when form_open is called stating:
"An Error Was Encountered. The URI you submitted has disallowed characters."
eligibletoenroll_view.php
<?= form_open('app/staff/advisees/setAdvisees($data->advisee_id)', array(
'class' => 'user-contact',
)) ?>
advisees.php
function setAdvisees($advisee_id) {
echo $advisee_id;