The following code works but when I validate it with www.w3c.org, it get the following errors:
Line 107, column 0: character data is not allowed here
1 <a class=nextprev href='/decorative_woodshelves.html?page=2'>2</a> <a class=ne
Line 107, column 62: document type does not allow element "A" here
...'/decorative_woodshelves.html?page=2'>2</a> <a class=nextprev href='/decorati
Line 107, column 129: document type does not allow element "A" here
...'/decorative_woodshelves.html?page=3'>3</a> <a class=nextprev href='/decorati
Line 107, column 196: document type does not allow element "A" here
...'/decorative_woodshelves.html?page=4'>4</a> <a class=nextprev href='/decorati
Line 107, column 263: document type does not allow element "A" here
...'/decorative_woodshelves.html?page=2'>NEXT >></a></table>
Here is the code
<?php
for ($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_assoc($result); if ($i % 2) {
echo "<TR bgcolor=\"#FFFFFF\">\n";
} else {
echo "<TR bgcolor=\"#A5CC7D\">\n";
}
echo "<TD align=center>"."<a href='\displaywoodshelves.html?id=$row[woodshelf_id]'><img border=0 height=120 width=157 alt='$row[woodshelf_name]' src='/images/woodshelves/$row[woodshelf_image]'></a> "."</td>
<TD align=center>"."<a class=productpageinfo href='/displaywoodshelves.html?id=$row[woodshelf_id]'><b>$row[woodshelf_name]</b></a>"."<br> - $row[woodshelf_demensions]"."</TD>
<TD align=center>"."12" $$row[woodshelf_1ftprice]"."<br>24\"" $\"$row[woodshelf_2ftprice]"."</TD>\n";
echo "</TR>\n";
}
if($page != 1){
$pageprev = $page - 1;
echo("\t<a class=nextprev href='$PHP_SELF?page=$pageprev>'<<PREV</a>");
}
for($i = 1; $i <= $numofpages; $i++){
if($numofpages>1){
if($i == $page)
echo("$i");
else
echo("\t<a class=nextprev href='$PHP_SELF?page=$i'>$i</a>");
}}
if(($totalrows - ($limit * $page)) > 0){
$pagenext = $page + 1;
echo("\t<a class=nextprev href='$PHP_SELF?page=$pagenext'>NEXT >></a>");
}
?>
</table>