It looks like the criteria that you are using to display the message is:
<?php if ($row_rsSize['quantity']!= "0") { // Show if recordset empty ?>
<?php echo $row_rsSize['backordermsg']; ?>
<?php } // Show if recordset empty ?>
This rsSize recordset looks like one that you are using for the values of the item. It looks like you have another recordset called inventory that should check on the inventory of the current item. Is this what you would like to use to determine if the item is on backorder? If so you should check the rsInventory recordset and check on the column in the table that lets you know the stock. When you check this stock you just need to see if is < 1, if so you should display the out of stock message.