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(); } Quote Link to comment Share on other sites More sharing options...
trq Posted October 20, 2014 Share Posted October 20, 2014 Why are people still using code ignitor? Quote Link to comment 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. Quote Link to comment 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.