I’m trying to trigger this function:
<?php
function messageNoResults() {
echo "<script>document.getElementById('messages').innerHTML = '<p>There are no results for that combo.</p>'<script>";
}
?>
I’m calling this function like this after two table queries have completed along with their mysql_num_count:
if ($counta == 0 && $countb == 0) { messageNoResults(); }
The message should be inserted at the top of the page:
<!-- warning messages displayed here -->
<div id="messages" style="color:red; text-align:center; visibility:visible;"></div>
I can successfully echo each of these counts, and they will return 0 each, but the function is not called. Any reason why?