Re: [PHP] globals off in function

2003-01-14 Thread Michael Bevz
Chris Hayes <[EMAIL PROTECTED]> ïèøåò â ñîîáùåíèè:[EMAIL PROTECTED] > > >in function i call to $smarty variable > >" > >function showLoginForm(){ > > > >global $db, $smarty; // $smarty = new Smarty in main code > >Fatal error: Call to a member function on a non-object in > > Are you sure >

Re: [PHP] globals off in function

2003-01-14 Thread Chris Hayes
in function i call to $smarty variable " function showLoginForm(){ global $db, $smarty; // $smarty = new Smarty in main code Fatal error: Call to a member function on a non-object in Are you sure $smarty = new Smarty is in the main code? Can it be in another function? Try setting globa

Re: [PHP] globals off in function

2003-01-14 Thread Jason Wong
On Tuesday 14 January 2003 18:46, Michael Bevz wrote: > I've such trouble: > ( register_globals = off ) The register_globals setting in php.ini has ... > in function i call to $smarty variable > " > function showLoginForm(){ > >global $db, $smarty; // $smarty = new Smarty in main code .

[PHP] globals off in function

2003-01-14 Thread Michael Bevz
Hi, all!!! I've such trouble: ( register_globals = off ) in function i call to $smarty variable " function showLoginForm(){ global $db, $smarty; // $smarty = new Smarty in main code $smarty->assign("message", $message); // " and i receive this error message " Fatal error: Call to a