I am trying to make a small survey form asking people questions and replying either yes or no.
I am trying though to execute the the first two functions on the 3rd function and also check if the answers were set but i get a:
Fatal error: Can't use method return value in write context in.
Can someone please help me or point me to the right path?
<?php
class survey {
... some functions ...
function check($rep1, $rep2){
if (isset($this->q1($rep1)) && isset($this->q2($rep2))) {
####################### #######################
echo "Thank you for the feedback";
}elseif (! array_key_exists(@$_POST['answer'], $var)) {
echo "Please select an option<br/>";
}
}
}
?>
The error is inside the check function on the first line.