Hi guys, I'm trying to pass data from a controller employees_controller.php, into an update view /employees/update.ctp.
I am passing an employee_id from /employees/index by clicking a link / employees/update/54940 (or some other id number). This launches a thickBox that contains a form in /employees/update.ctp. For some reason, I can not figure out how to get my data that corresponds to the current employee id preloaded into the form. Any help would be nice. Here's my code right now: >From controllers/employees_controller.php function update($employeeID) { $employee = $this->Employee->findAllById($employeeID); $this->set(compact('employee')); } >From /views/employees/update.ctp <?php if ($employee){ echo $form->create('Employee'); echo $form->input('name'); echo $form->input('ssn'); echo $form->input('customer'); echo $form->input('position'); echo $form->input('location'); echo $form->input('status'); echo $form->input('alcohol_date'); echo $form->input('drug_date'); echo $form->input('status_date'); echo $form->input('data_entry'); echo $form->hidden('id',array('value' => $employee['employees'] ['id'] )); echo $form->end(); } ?> Thanks in advance, Travis --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---