Here is the code I have so far:
Code: Select all
$query1="SELECT * FROM xcart_products WHERE add_date < '$today_date' && add_date > '$minus_five_days'";
$result1=mysql_query($query1);
$numrows1=mysql_numrows($result1);
//echo $numrows1;
if ($numrows1 < 2)
{
$latest_prod = "Latest product: ";
}
else
{
$latest_prod = "Latest products: ";
}
$count = 0;
while ($count < $numrows1)
{
$product=mysql_result($result1,$count,"product");
//echo $product." - ";
$product_id=mysql_result($result1,$count,"productid");
//The above variables will be included in: <a href="http://store.plastikracing.net/product.php? productid={PRODUCT_ID}" target="_blank">{PRODUCT} <img src="http://store.plastikracing.net/product_images/t_{PRODUCT_ID}.jpg" width="50" height="38"></a><br>
$count++;
}Code: Select all
$display_product = "<a href='http://store.plastikracing.net/product.php?productid=".$product_id." target='_blank'>".$product."<img src='http://store.plastikracing.net/product_images/t_".$product_id.".jpg' width='50' height='38'></a><br>";Code: Select all
$display_product = "<a href='http://store.plastikracing.net/product.php?productid=".$product_id[0]." target='_blank'>".$product[0]."<img src='http://store.plastikracing.net/product_images/t_".$product_id[0].".jpg' width='50' height='38'></a><br><a href='http://store.plastikracing.net/product.php?productid=".$product_id[1]." target='_blank'>".$product[1]."<img src='http://store.plastikracing.net/product_images/t_".$product_id[1].".jpg' width='50' height='38'></a><br>";