Hi all,
I have form (mypage.php) to which I'm sending some data using:
require_once($CFG->dirroot.'/user/profile/lib.php');
$pur = profile_user_record($USER->id);
$toform = array('firstname'=>$USER->firstname,'lastname'=>$USER->lastname, 'email'=>$USER->email , 'businessunit'=>$pur->businessunit);
$request_course->set_data($toform);
The resulting form is correctly displayed.
However I want then to find all users in the same "Business Unit" and thought that within mypage_form.php I could use $toform['businessunit'] but this appears not to be the case as $toform doesn't exist.
I'm clearly missing something that should be obvious but not to me.
Any advice greatly appreciated.
Many Thanks
Dave