Re: Using a view with some parameters



On Jun 12, 11:37 am, Harris Kosmidhs
<hkosm...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
<snip>
function ShowLogin($loginErrors="") {
....
$loginvars['use_cookies']=$this->use_cookies;
$loginvars['action']=$this->action;

if($loginErrors!="") $loginvars['errors']=$loginErrors;

$logform=get_include_contents('views/generalLoginForm.php');

return $logform;
}
<snip>
The problem is in the views/generalLoginForm.php. The beginning of it has:
<?php global $loginvars,$loginclassname;?>
<form class="<?php echo $loginclassname; ?>" action="<?php echo
$loginvars['action']; ?>"

$loginvars and $loginclassname is always "". Why is that?


Because they are not in the global scope.

C
.