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 ???
[Back to original message]
|