Jump to content

codeigniter, how to store into view


Yohanne

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.