Re: [PHP] Simple class declaration returns error [SOLVED]

2006-06-16 Thread Dave M G
Jochem, Thank you for your advice. I was able to use your suggested code to develop the results I wanted. I found I could simplify the self references down to just the name of the class. The syntax I ended up with is class database { private static $database; public static function

Re: [PHP] Simple class declaration returns error [SOLVED]

2006-06-16 Thread Jochem Maas
Dave M G wrote: Jochem, Thank you for your advice. I was able to use your suggested code to develop the results I wanted. I found I could simplify the self references down to just the name of the class. that sounds backwards - self == 'database' with the added bonus that if you change

Re: [PHP] Simple class declaration returns error

2006-06-15 Thread Jochem Maas
Dave M G wrote: PHP List, Okay, I've upgraded to php 5 on my home machine, and I'm still getting what version? some syntax errors. Parse error: syntax error, unexpected T_NEW in /home/dave/web_sites/thinkingworks.com/web/database.class on line 5 This is the code producing the error:

Re: [PHP] Simple class declaration returns error

2006-06-15 Thread Dave M G
PHP List, Okay, I've upgraded to php 5 on my home machine, and I'm still getting some syntax errors. Parse error: syntax error, unexpected T_NEW in /home/dave/web_sites/thinkingworks.com/web/database.class on line 5 This is the code producing the error: class database { public static

Re: [PHP] Simple class declaration returns error

2006-06-15 Thread Eric Butera
On 6/14/06, Dave M G [EMAIL PROTECTED] wrote: I put in a very simple echo statement, just as a place marker before I put in the real code, and just to make sure that the index.php file is successfully including the class. After you fix your parse errors you might take a look at:

[PHP] Simple class declaration returns error

2006-06-14 Thread Dave M G
PHP List, I am in the preliminary stages of designing my first object oriented PHP based web site. I've created file called article.class and included it in my index.php file. I put in a very simple echo statement, just as a place marker before I put in the real code, and just to make sure

Re: [PHP] Simple class declaration returns error

2006-06-14 Thread Brad Bonkoski
What version of PHP are you using? I suspect something less then 5.0 which means the public/private declarations are not supported... (So remove 'public' and see if it works) -Brad Dave M G wrote: PHP List, I am in the preliminary stages of designing my first object oriented PHP based web

Re: [PHP] Simple class declaration returns error

2006-06-14 Thread Dave M G
Brad, What version of PHP are you using? I suspect something less then 5.0 which means the public/private declarations are not supported... (So remove 'public' and see if it works) Yes, it turns out that I am using PHP 4, and I thought I was using 5. Thank you for pointing it out. Now I

Re: [PHP] Simple class declaration returns error

2006-06-14 Thread Jochem Maas
Dave M G wrote: Brad, What version of PHP are you using? I suspect something less then 5.0 which means the public/private declarations are not supported... (So remove 'public' and see if it works) Yes, it turns out that I am using PHP 4, and I thought I was using 5. Thank you for pointing