Jump to content

[SOLVED] Disable link if recordset = 0?


A JM

Recommended Posts

Should this be implemented in HTML like so?

 

<?php $img = ($totalRows_rst == 0)? "<img src='../images/view.png' title='VIEW INVOICE' width='32' height='32' />" : "<a href='qry_open_detail.php?recordID=<?php echo  $row_rstcue['inv_num']; ?>'><img src='../images/view.png' title='VIEW INVOICE' width='32' height='32' /></a>"; ?>
<?php $img = ($totalRows_rst == 0)? "<img src='../images/view.png' title='VIEW INVOICE' width='32' height='32' />" : "<a href='qry_open_detail.php?recordID={$row_rstcue['inv_num']}'><img src='../images/view.png' title='VIEW INVOICE' width='32' height='32' /></a>";?>

<?php $img = ($totalRows_rst == 0)? "<img src='../images/view.png' title='VIEW INVOICE' width='32' height='32' />" : "<a href='qry_open_detail.php?recordID={$row_rstcue['inv_num']}'><img src='../images/view.png' title='VIEW INVOICE' width='32' height='32' /></a>"; echo $img; ?>

 

oops.  Still needed the echo, just needed to move it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.