homer.favenir Posted October 27, 2008 Share Posted October 27, 2008 hi, i have an input field, my variable for it is $directory. is it possible that 2 models will received the input data? controller: function process() { $data['title'] = "DS Validator"; $data['header'] = "DS Validator"; $data['batch'] = $this->process_model->directory(); // first model to received the input $this->process_model->export(); // 2nd model to received the input $this->load->view('process', $data); } function export() { $data['title'] = "DS Validator Export"; $data['header'] = "DS Validator Export"; $data['excel_file'] = $this->process_model->export(); $this->load->view('export', $data); } model function directory() { $title = "DS Validator Results"; $header = "DS Validator Results"; $kebase = "//asecasianas2/DS_Keying/STATS/KE-DIR/"; $qcbase = "//asecasianas2/DS_Keying/STATS/QC-DIR/"; $dir = $this->input->post('directory'); $kedir = $kebase . $dir; $qcdir = $qcbase . $dir; $kefiles = scandir($kedir); $qcfiles = scandir($qcdir); $count_files = count($qcfiles); return array($kebase, $qcbase, $dir, $kedir, $qcdir, $kefiles, $qcfiles, $count_files, $title, $header); } function export() { $title = "DS Validator Results"; $header = "DS Validator Results"; $kebase = "//asecasianas2/DS_Keying/STATS/KE-DIR/"; $qcbase = "//asecasianas2/DS_Keying/STATS/QC-DIR/"; $dir = $this->input->post('directory'); $kedir = $kebase . $dir; $qcdir = $qcbase . $dir; $kefiles = scandir($kedir); $qcfiles = scandir($qcdir); $count_files = count($qcfiles); return array($kebase, $qcbase, $dir, $kedir, $qcdir, $kefiles, $qcfiles, $count_files, $title, $header); } but this script doesnt work. please help thanks Quote Link to comment https://forums.phpfreaks.com/topic/130245-possible-with-model/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.