Welcome Guest, Not a member yet? Register   Sign In
accessing base class variable
#3

[eluser]mehwish[/eluser]
Actually I want to set some variables global so that from any method in my Form_controller class can access the value.
Code:
<?php


class Form_Controller extends MY_Controller {
    
    function Form_controller()
    {
        parent::Controller();
         }


     function index()
    {
                  if ($this->input->post('submitbutton2'))  
                      $email1=$this->input->post('email');
                  else $this->load->view('someview');
} // end of function index


function my_profile_page()
{echo $this->email1;}

}//end of class


Now I want to print the 'email1' variable. What should be the way to print?


Messages In This Thread
accessing base class variable - by El Forum - 06-06-2011, 01:59 AM
accessing base class variable - by El Forum - 06-06-2011, 02:36 AM
accessing base class variable - by El Forum - 06-06-2011, 06:31 AM
accessing base class variable - by El Forum - 06-06-2011, 02:23 PM
accessing base class variable - by El Forum - 06-07-2011, 12:05 PM
accessing base class variable - by El Forum - 06-07-2011, 02:35 PM
accessing base class variable - by El Forum - 06-08-2011, 03:12 AM
accessing base class variable - by El Forum - 06-08-2011, 03:57 AM
accessing base class variable - by El Forum - 06-08-2011, 04:19 AM
accessing base class variable - by El Forum - 06-08-2011, 04:31 AM
accessing base class variable - by El Forum - 06-08-2011, 05:14 AM
accessing base class variable - by El Forum - 06-08-2011, 07:33 AM
accessing base class variable - by El Forum - 06-08-2011, 11:43 PM
accessing base class variable - by El Forum - 06-09-2011, 12:54 AM
accessing base class variable - by El Forum - 06-09-2011, 05:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB