Welcome Guest, Not a member yet? Register   Sign In
Passing the variable to view from another view
#2

[eluser]Beginers[/eluser]
when you pass the variable
Code:
$data['heading']="My Real Heading";
to your register_open view the array name of your $data['heading'] will be converted to a variable to your view something like this :
Code:
<html>
<head>
<title><?php echo $heading?></title>
</head>
<body>
</body>
</html>

notice that it's not a $data anymore but $heading so when you pass it again to another view you should create another variable that will handle the value. Something like this:

Code:
$data['heading']=$heading;
$this->load->view('register/register_view',$data);

I don't know if that works. Just try it.


Messages In This Thread
Passing the variable to view from another view - by El Forum - 10-26-2012, 02:44 AM
Passing the variable to view from another view - by El Forum - 10-26-2012, 03:11 AM
Passing the variable to view from another view - by El Forum - 10-26-2012, 03:23 AM
Passing the variable to view from another view - by El Forum - 10-26-2012, 05:04 AM
Passing the variable to view from another view - by El Forum - 10-26-2012, 05:32 AM
Passing the variable to view from another view - by El Forum - 10-26-2012, 08:25 AM
Passing the variable to view from another view - by El Forum - 10-26-2012, 08:59 AM
Passing the variable to view from another view - by El Forum - 10-26-2012, 11:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB