Update html.php

Fixed bug -- using the $query object without defining it by aligning the code with the fix in j3.0 version