why do i get ->
Fatal error: Call to a member function on a non-object in ....
this is the file containing the class
<?php
class forms {
var $error = array (
"Error msg 1";
"Error msg 2";
)
function check ($firstname) {
if (!$firstname) {
return $this->error[1];
}
}
}
?>