Welcome Guest, Not a member yet? Register   Sign In
codeigniter, $this-> property not available in 1 method after being set in another
#1

[eluser]bill19[/eluser]
Hi everyone.

I have the following method in my 'Main' controller:

Code:
function display_upload_form($row)
{
        $this->row=$row;
        echo $this->row;
        
        
  $this->load->view('upload_form', array('error' => ' ' ));
}

echo $this->row produces the correct db row number.

Following this, the form submits to Main/do_upload

Code:
<?php echo form_open_multipart('Main/do_upload');?>

At the beginning of the 'do_upload' method, I have

Code:
function do_upload()
{
          
                   var_dump($this->row);

The output is :
Quote:string '' (length=0)

Why is $this->row not available globally?

Thank you,

Bill


Messages In This Thread
codeigniter, $this-> property not available in 1 method after being set in another - by El Forum - 06-11-2012, 09:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB