Hi,
Anyone can help me on how to create a printable version of MySQL data to be printed from PDF of Excel but moat preferably on the webpage?
[PHP]<? require_once '../../functions.php'; $sql = "SELECT * FROM fragrancestock WHERE Quantity = '0'"; $rowsPerPage = 10; $result = dbQuery(getPagingQuery($sql, $rowsPerPage)); $pagingLink = getPagingLink($sql, $rowsPerPage); ?> <form action="index.php?view=add" method="post" name="frmList" id="frmList"> <table width="700" border="0" align="center"> <tr class="title_text"> <td colspan="7"></td> </tr> <tr class="title_text"> <td width="200">Category</td> <td width="200">Brand</td> <td width="200">Available Stock</td> <td width="200">Date Added</td> <td width="50">Details</td> <td width="50">Add</td> <td width="50">Delete</td> </tr> <?php if (dbNumRows($result) > 0) { $i = 0; while($row = dbFetchAssoc($result)) { extract($row); if ($i%2) { $class = 'row1'; } else { $class = 'row2'; } $i += 1; ?> <tr class="<?php echo $class; ?>"> <td width="200"><?php echo $Category; ?></td> <td width="200"><?php echo $Brand; ?></td> <td width="200" class="inner_border"><?php echo $Quantity; ?></td> <td width="200"><?php echo $DateAddedStock; ?></td> <td width="50"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?view=detail&StockID=<?php echo $StockID; ?>">View</a></td> <td width="50"><a href="javascript:modifyStock(<?php echo $StockID; ?>);"><strong>Add </strong> </a></td> <td width="50"><a href="javascript:deleteStock(<?php echo $StockID; ?>);">Delete</a></td> </tr> <?php } // end while ?> <tr> <td colspan="7" align="center"> <?php echo $pagingLink; ?> </td> </tr> <?php } else { ?> <tr> <td colspan="7" align="center">No stock for <? echo '<strong>'; echo $ShowBrand; echo ' '; echo "</strong>"; ?></td> </tr> <?php } ?> <tr> <td colspan="7"> </td> </tr> <tr> <td colspan="6" align="right"> <input name="btnAddStock" type="submit" value="New Entry" class="button_image"> <td align="right"><input name="btnCancel" type="button" id="btnCancel" value="Return" onClick="window.history.back();" class="button_image"></tr> </table> <p> </p> </form>[/PHP]