How to hide an area of HTML if a recordset result is empty
By Chris on September 18, 2010 in php
0
0
A simple bit of code like the one below is all you need. In this case the recordset name is ‘rs_page’ and the table column that is being tested is ‘image’. If there is nothing returned from the query then the area ‘HTML here’ is hidden.
<?php if (!empty($row_rs_page[‘image’])) {?>
HTML here
<?php }?>
0 Comments
Leave a reply
Leave a Reply
You must be logged in to post a comment.