SIDE by SIDE
Posted: Wed Aug 01, 2007 8:13 pm
The code may not be pretty, but at least it doesn't work. Actually it works fine but...
I need this to display the information in 2 columns and then repeat.
Well all it does is repeat one table verticaly.
Can someone please help with this?
hawleyjr | Please use
I need this to display the information in 2 columns and then repeat.
Well all it does is repeat one table verticaly.
Can someone please help with this?
Code: Select all
//$it logs into the database
//and then...
$query = "SELECT * FROM artcarve";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
echo "<table border=1 id=table1><table border=1 class=itemleft>";
echo "<tr><td class=itemnum>ITEM NUMBER:" . $row['item'] . "</td></tr>";
echo "<tr><td class=img><img src=http://www.website.com/shop/thumbs/".($row['item']).".JPG></img></td></tr>";
echo "<tr><td class=title>" . $row['title'] . "</td></tr>";
echo "<tr><td class=desclink><a href=# onClick=\"return overlay(this, '".($row['item'])."', 'leftbottom')\">Description</a>";
echo "|";
echo "<a href=\"javascript:popImage('http://www.website.com/shop/images/".($row['item']).".JPG')\">Enlarge Photo</a>";
echo "<tr><td></td></tr>";
echo "<tr><td class=price>" . $row['price'] . "</td></tr>";
echo "<tr><td>";
echo "<form target=>";
echo "<input type=hidden name=add value=1>";
echo "<input type=hidden name=cmd value=_cart>";
echo "<input type=hidden name=business value=>";
echo "<input type=hidden name=item_name value=\"".($row['title'])."\">";
echo "<input type=hidden name=item_number value=".($row['item']).">";
echo "<input type=hidden name=amount value=".($row['price']).">";
echo "<input type=hidden name=no_shipping value=0>";
echo "<input type=hidden name=no_note value=1>";
echo "<input type=hidden name=currency_code value=>";
echo "<input type=hidden name=lc value=US>";
echo "<input type=hidden name=bn value=>";
echo "</form>";
echo "</td></tr>";
echo "<DIV id=".($row['item'])." style=\"position:absolute; display:none; border: 9px solid black; background-color: lightyellow; width: 210px; height: 85px; left:12px; top:11px\">";
echo $row['description'];
echo "<div align=right><a href=# onClick=\"overlayclose('".($row['item'])."'); return false\">Close Box</a></div>";
echo "</DIV>";
echo "</table>";
}
mysql_close($con);
?>hawleyjr | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]