Code not lining properly
Posted: Tue Jun 26, 2007 8:21 am
Code: Select all
<?
$ref = $_GET['r'];
if ($_GET['r'] != "") {
$rid = $_GET['r'];
}
//select the table
$result = mysql_query("select * from gifts order by gId");
$i = 1;
//grab all the content
while($r=mysql_fetch_array($result))
{
$gid=$r["gId"];
$gname=$r["gName"];
$gdescription=$r["gDescription"];
$gimage=$r["gImage"];
$gprice=$r["gPrice"];
?>
<Td>
<Table style="width:200px "><tr><td><div class="top"><div class="gimage" align="center"><img src="<? echo "$gimage"; ?>" border="0"></div></td></tr>
<tr><td align="center"><div class="gname"><? echo "$gname"; ?></div></td></tr>
<tr><td><div class="gdescription"><? echo stripslashes($gdescription); ?></div></td></tr>
<tr><td><div class="gprice" align="left"><font color="#000000">Price:</font> $<? echo "$gprice"; ?><font color="#000000"> <a href="register.php?gid=<? echo "$gid"; ?>&&r=<? echo "$rid"; ?>"> Get It Free</a>>></font><font color="#FF9900" style="font-weight:bold "></font> </div></td></tr>
</Table>
</Td>
<?
if ($i % 3 == 0) { echo "</tr><tr>"; }
$i++;
}
?>