Page 2 of 2

accessing class variables

Posted: Mon Sep 23, 2002 1:18 pm
by kendall
hey,

why did you put the $inValidFields = array();

if in the class object i did

return $this->$ErrorMSG;

and had a line in the foreach loop

a$= $inValidFields->checkFields($Field,$Value);

would this have worked?

i just need to get back the errors so that i can use them in the included file?

Accessing class variables

Posted: Mon Sep 23, 2002 1:27 pm
by kendall
Hey,

Y did he put $inValidFields = array();?

if i did $ErrorMSG = array();

and returned the $ErrorMSG;

and have $a=inValidFields->checkFields();

in the foreach statement

would i not get the same result?

Posted: Mon Sep 23, 2002 3:01 pm
by nielsene
I put that $inValidFields= array(); in my verison to make sure that the array was empty before starting the loop.

I hadn't noticed that your Field class uses ErrorMSG as an array already. I think you can do something like what you mention in your recent post, but there are a few logic errors that I think would have to be cleaned up.