I'm working for a database for grades for a whole class, and the parameters I was given need me to make a code so that when the teacher has not entered the grades, it posts a message "Grade not yet available", but with the posibility that a student gets a zero. But with my testing, the function empty() takes the same value if the grade is 0 or if it's empty.
if (empty($row_Recordset1['c1'])){
echo "Grade not yet available";
}else{
echo $row_Recordset1['c1'];
}
So, according to this code, if the teacher had not entered a grade, the system would say "not available", and if someone got a zero o anything else, the sistem would say the grade, which in this case is the array variable $row_Recordset1['c1']. Unfortunately my system does not do that. If I have a 0 or if there's no value in the database, it posts nothing.
¿Any suggestios? Thanx in advance.