Skip to content

Instantly share code, notes, and snippets.

@Twipped
Forked from anonymous/widget
Created March 5, 2012 22:56
Show Gist options
  • Save Twipped/1981808 to your computer and use it in GitHub Desktop.
Save Twipped/1981808 to your computer and use it in GitHub Desktop.
widget
<?php
include("conn.php");
##include("check.php");
$sql = ("SELECT * FROM inv");
$result = mysql_query($sql);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Plantlife Wholesale</title>
</head>
<body>
<div style="font-family:Verdana, Arial, Helvetica, sans-serif">
<table border="1" align="center" cellpadding="0" cellspacing="2">
<tr style="font-size:x-small">
<td><div align="center">Product Id: </div></td>
<td><div align="center">Product Name: </div></td>
<td><div align="center">Weight(UoM): </div></td>
<td><div align="center">Price: </div></td>
<td><div align="center">Category: </div></td>
<td><div align="center">Case/Pack: </div></td>
</tr>
<? while ($a_rows = mysql_fetch_assoc($result)) { ?>
<tr>
<td><?php echo htmlentities($a_rows['column1'], ENT_QUOTES, "UTF-8") ?></td>
<td><?php echo htmlentities($a_rows['column2'], ENT_QUOTES, "UTF-8") ?></td>
<td><?php echo htmlentities($a_rows['column3'], ENT_QUOTES, "UTF-8") ?></td>
<td><?php echo htmlentities($a_rows['column4'], ENT_QUOTES, "UTF-8") ?></td>
<td><?php echo htmlentities($a_rows['column5'], ENT_QUOTES, "UTF-8") ?></td>
<td><?php echo htmlentities($a_rows['column6'], ENT_QUOTES, "UTF-8") ?></td>
</tr>
<?php } ?>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment