> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: 28 June 2006 10:10

 
> Fatal error: Call to a member function query() on a 
> non-object in 
> C:\Xampp\xampp\htdocs\www2\knowledge_db\searchnew.php on line 81
> 
> Even though the $connection has already been established in a 
> other .php file.

You can't do that -- there's simply no way to pass a database connection
from one script to the next.

>  However, it should work since there is a 
> global declaration.

That's not what a global declaration is about.  Please go read the fine
manual again:
http://ch.php.net/manual/de/language.variables.scope.php#language.variab
les.scope.global

Cheers!

Mike
 
------------------------------------------------------------------------
----------------
Mike Ford, Electronic Information Services Adviser, Learning Support
Services,
JG125, The Library, James Graham Building, Headingley Campus, Beckett
Park,
LEEDS, LS6 3QS,     United Kingdom
Tel: +44 113 283 2600 extn 4730    Fax: +44 113 283 3211


To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

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

Reply via email to