Okay, here goes:
HTML Code:
Code:
<head>
</style>
<style type="text/css">
#message {
position:absolute;z-Index:101;left:-3000px;top:-3000px;width:430px;
}
</style>
</head>
<body>
:
: misc. code
:
<table width="90%" border="5" bordercolorlight="#D0C9B7" bordercolordark=#4E4B3D cellpadding="10" cellspacing="5" bgcolor="#CDC5B0">
<tr>
<td colspan=6 align="right"><a href="http://alongcrazyalley.com/store/index.php?main_page=shopping_cart">View Cart</a></td>
</tr><tr>
<?php include("table_build.php"); ?>
</table>
<form name="cart_quantity" action="http://alongcrazyalley.com/store/index.php?main_page=product_info&cPath=0&products_id=2&action=add_product" method="post" enctype="multipart/form-data" onsubmit="return Message(this,'message',1000,2000)">
<input type="hidden" name="cart_quantity" value="1" /><input type="hidden" name="products_id" value="2" /><input type="image" src="includes/templates/template_default/buttons/english/button_in_cart.gif" alt="Add to Cart" title=" Add to Cart " />
</form>
<div id="message" >
<table border=2 width=450px bgcolor="#C0C0C0"><tr><td>
<center><p>Your button has been added to the shopping cart.<p> <br>Please click on "View Cart" to review your purchases and checkout.
</td></tr></table>
</div>
<script src="SCMessage.js"></script>
<p><img src="Graphics/h1.gif" height=20 width="100%">
<p>
<a href="mailto:m.j.weinberg@earthlink.net?subject=Wild Wednesday Order">Email me your order</a>
</body>
PHP Code:
Code:
<head>
</style>
<style type="text/css">
#message {
position:absolute;z-Index:101;left:-3000px;top:-3000px;width:430px;
}
</style>
</head>
<body>
:
: misc. html code
:
<table width="90%" border="5" bordercolorlight="#D0C9B7" bordercolordark=#4E4B3D cellpadding="10" cellspacing="5" bgcolor="#CDC5B0">
<tr>
<td colspan=6 align="right"><a href="http://alongcrazyalley.com/store/index.php?main_page=shopping_cart">View Cart</a></td>
</tr><tr>
<!-- Buttons should be scanned at 300 x 300 pixels-->
<?php
// Fill table
$result = mysql_query("SELECT * FROM zen_products_description");
$result1 = mysql_query("SELECT * FROM zen_products");
if($result) {
$count = 1;
while($row = mysql_fetch_array($result)) {
$row1 = mysql_fetch_array($result1);
$id = $row["products_id"];
$name = $row["products_name"];
$description = $row["products_description"];
$price = $row1["products_price"];
$image = "../store/images/".$row1["products_image"];
$quantity = $row1["products_quantity"];
if ($quantity == 0) {
$price = "<i><b><font color='Red'>Sold</font></b></i>";
}
$popup = ' onclick = "return Message(this,'."'message'".',1000,2000)"';
$part1 .= "<td align='center'><a href='".$image."' class='MagicThumb'><img width=125 src=".$image."></a>";
$part2 .= "<td align='center' bgcolor='#Ded9ce'><form name='cart_quantity' action='http://alongcrazyalley.com/store/index.php?main_page=product_info&cPath=0&products_id=".$id."&action=add_product' method='post' enctype='multipart/form-data' target='zenframe'".$popup.">";
$part2 .= "<br><font size=-1 face='Verdana'>".$name."<br>".$description."<br>".$price;
if ($quantity != 0) {
$part2 .= "<br><input type='hidden' name='cart_quantity' value='1' /><input type='hidden' name='products_id' value='".$id."' /><input class='hoverable add_to_cart_button' title='Add to Cart' alt='Add to Cart' type='submit' value='Buy Now' /></form>";
}
$part1 .= "</td>";
$part2 .= "</td>";
$count = $count + 1;
if ($count > 4) {
print ($part1);
print("</tr><tr>");
print ($part2);
print("</tr><tr>");
$count=1;
$part1='';
$part2='';
}
}
}
?>
</tr>
</table>
</form>
<div id="message" >
<table border=2 width=450px bgcolor="#C0C0C0"><tr><td>
<center><p>Your button has been added to the shopping cart.<p> <br>Please click on "View Cart" to review your purchases and checkout.
</td></tr></table>
</div>
<script src="SCMessage.js"></script>
<iframe id="cart_frame" src="../store/index.php?main_page=shopping_cart" name="zenframe" width="0" height="0" style="visibility:hidden"></iframe>
<p>
<p><img src="Graphics/h1.gif" height=20 width="100%">
<p>
<center><font face="Verdana" color="black" size=3><i><b>Contact us at</i> <a href="mailto:crazy@alongcrazyalley.com?subject=ACAWW-">crazy@alongcrazyalley.com</a></b>
In the HTML version, the PHP file simply fills the rows of the table. In the PHP version, everything is built dynamically.
Hope this helps.
Bookmarks