Hello everybody I am writing a video sharing web site. I need the user to input video information, every video has one or more video files, (records of video_files only contain the path information of the files, files are uploaded through ftp clients, and the user have to input the path informations). The Video and VideoFile models are created as follows:
class Video extends AppModel { var $hasMany = array('VideoFile'); .... } class VideoFile extends AppModel { ... } How to create a form so that the user can input all the video file path information at the same time easily? SQL script used to create the two tables: CREATE TABLE videos ( id INT ..., ... ); CREATE TABLE video_files ( id INT ..., ... video_id INT, ... FOREIGN KEY(video_id) REFERENCES video(id) ); PHP code: <?php echo $form->create('Video'); echo $form->input('title'); ... echo $form->input('VideoFile'); // <----------How to write this line echo $form->end('Add'); ?> Thanks --Teng Yao --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---