Hi Everyone
I am trying to validate a site that was written by someone else, They have put a promo table but the table is not validating and am thinking of putting in css. but I have no idea where to start
Any help on either converting it or vaidating it would be much much appreiciated as i h have spent days trying to sort it out.
This is the error the validator is giving me
document type does not allow element "td" here; assuming missing "tr" start-tag
<?php
$find_page=mysql_query("SELECT * FROM pageText WHERE pageRef='main'");
$pageArray=mysql_fetch_array($find_page);
?>
<?php
include("template_middle/top.inc");
$promoArray=Array();
$find_promos=mysql_query("SELECT * FROM ctl_products_items WHERE prodFeatured='1'");
while($promo_details=mysql_fetch_array($find_promos)){
$promoArray[]=Array(id => $promo_details[id], prodLabel => $promo_details[prodLabel], prodSummary => $promo_details[prodSummary], prodPrice => $promo_details[prodPrice], prodPriceOffer => $promo_details[prodPriceOffer]);
}
shuffle($promoArray);
echo("<table width=\"100%\" class=\"mainText\"><tr>");
for($iDH=0;$iDH<8;$iDH++){
echo("<td valign=\"top\" width=\"50%\">");
if($promoArray[$iDH][prodLabel]){
echo("<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\"><tr><td colspan=\"2\" class=\"prodTitle\">".$promoArray[$iDH][prodLabel]."</td></tr>
<tr>
<td align=\"center\"><a href=\"index.php?page=viewProd&prodID=".$promoArray[$iDH][id]."\" onmouseover=\"window.status='View Details'; return true;\" onmouseout=\"window.status='Simply Craft'; return true;\">");
if(file_exists("product_images/thumbs/".$promoArray[$iDH][id]."-1.jpg")){
echo("<img src=\"product_images/thumbs/".$promoArray[$iDH][id]."-1.jpg\" height=\"100\" alt=\"".$promoArray[$iDH][prodLabel]."\" title=\"".$promoArray[$iDH][prodLabel]."\" border=\"0\" />");
}else{
echo("<img src=\"images/none.gif\" title=\"Image coming soon\" alt=\"Image coming soon\" width=\"100\" border=\"0\" />");
}
echo("</a></td>
<td valign=\"top\" class=\"mainText\">".$promoArray[$iDH][prodSummary]."</td></tr><tr><td align=\"center\"><a href=\"index.php?page=viewProd&prodID=".$promoArray[$iDH][id]."\" onmouseover=\"window.status='View Details'; return true;\" onmouseout=\"window.status='Simply Craft'; return true;\"><img src=\"images/fulldetails.gif\" alt=\"Full Details\" border=\"0\"/></a></td>
<td align=\"right\"class=\"blackText\">");
if($promoArray[$iDH][prodPriceOffer]>0){
echo("<s>£".$promoArray[$iDH][prodPrice]."</s> Offer Price: £".$promoArray[$iDH][prodPriceOffer]."");
}else{
echo("<b>Only</b> <span class=\"prodPrice\">£".$promoArray[$iDH][prodPrice]."</span>");
}
echo("</td>
</tr></table>");
}else{
echo(" ");
}
echo("</td>");
if($iDH%2==0){
echo("<td class=\"dotted\" width=\"2\"></td>");
}else{
echo("<td class=\"dotted\" height=\"3\"></td><td width=\"2\" height=\"3\"></td><td class=\"dotted\" height=\"3\"></td></tr>");
}
}
echo("</table>");
include("template_middle/lower.inc");
?>
Thank you so much for any help
Gwen