Yohanne Posted October 20, 2014 Share Posted October 20, 2014 Hi coders, code below are running good, but my problem is i did not get the line echo $row->pof_num + 1; into view "generate_po.php". since i want that line to get the value and put into input text like below. how and kindly assist. <input type = "text" name = "num" value = "<?php echo $row->pof_num + 1; ?>"> public function generate_po() { $po_id = $this->input->post('selector'); $data['result'] = $this->public_base_model->generate_po($po_id); if($this->session->userdata('logged_in')) { $session_data = $this->session->userdata('logged_in'); $data['username'] = $session_data['username']; $data['fname'] = $session_data['fname']; $data['userid'] = $session_data['userid']; $this->load->view('generate_po', $data,$this->get_max()); } else { $this->load->view('login'); } } public function get_max() { $query2 = $this->db->query("SELECT pof_num FROM pull_out where pof_num = '8800000582'"); $row = $query2->row(); echo $row->pof_num + 1; // i want this line to put into view. $query2->free_result(); } Link to comment https://forums.phpfreaks.com/topic/291943-codeigniter-how-to-store-into-view/ Share on other sites More sharing options...
trq Posted October 20, 2014 Share Posted October 20, 2014 Why are people still using code ignitor? Link to comment https://forums.phpfreaks.com/topic/291943-codeigniter-how-to-store-into-view/#findComment-1494234 Share on other sites More sharing options...
Yohanne Posted October 21, 2014 Author Share Posted October 21, 2014 ah sorry, for asking codeigniter, i think i am in the wrong forums. Link to comment https://forums.phpfreaks.com/topic/291943-codeigniter-how-to-store-into-view/#findComment-1494297 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.