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

... nothing to do with the 'global' statement.

>   $smarty->assign("message", $message); // !!!!
> "
> and i receive this error message
> "
> Fatal error: Call to a member function on a non-object in
> /usr/home/elastic.org/work/svyatoshin/system/common_func.php on line 22
> "

> Who can help me?

Assuming line 22 is (it would help if you told us _which_ is line 22)

  $smarty->assign("message", $message);

and assuming that you _really_ have defined $smarty in the main code then I 
cannot see what you're doing wrong.

Does $smarty->assign("message", $message work in the main loop (ie when not in 
a function)?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
In Oz, never say "krizzle kroo" to a Woozy.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to