You are here: Re: Defining vars outside the class « PHP Programming Language « IT news, forums, messages
Re: Defining vars outside the class

Posted by freak on 05/26/06 22:22

"Oli Filth" <catch@olifilth.co.uk> schreef in bericht
news:axHdg.2629$002.383@newsfe2-gui.ntli.net...
> freak said the following on 26/05/2006 18:54:
>> Using PHP version: *4.3.7*
>> I try to define my db vars outside the class!
>> Why this will not work?
>> class mytest{
>> ...
>> }
>>
>> //test example
>> ...
>> $SelectedDB = mysql_select_db( $this->DBNAME) or die ("<br>database
>> error= ".mysql_error());
>> $connection = mysql_connect($this->HOST, $this->USERNAME,
>> $this->PASSWORD) or die ("<br>".mysql_error());
>
>
> $this doesn't exist outside a class.
>
>
> P.S. Please post in this newsgroup as plain-text only.
>
>
> --
> Oli

OK so what is the solution ???

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация