Hey guys, i've been having a go at / learning some php for the last 4 weeks or so. its been really interesting. ive however hit a problem that i cannot find a solution to.

Here is the website in question

every sixth or so refresh in the 'Hot Items' section one of the items color will turn black rather than blue. it also seems to echo multiple <a></a> tags when it does this also.

Here is the PHP that generates this code:

// Hot Items Banner
$extract = mysql_query("SELECT idBikeEx, display, titleDescrip, price, salePrice, imgThumb, salePerc FROM products WHERE display='Yes' AND avail='Now In Store' AND newOrUsed='New' ORDER BY views DESC LIMIT 5");
while ($detailSpec = mysql_fetch_assoc($extract))
  echo "<a href='?sec=products&page=item&itemId=".$detailSpec[idBikeEx]."'><div id='miniBox'>";
  if (file_exists("images/prodImages/".$detailSpec[idBikeEx]."/t1.jpg"))
       echo "<img src='images/prodImages/".$detailSpec[idBikeEx]."/t1.jpg'alt='".$detailSpec[titleDescrip]."'/>";
       echo "<img src='images/prodImages/noImageThumb.png'alt='".$detailSpec[titleDescrip]."'/>";
  echo "<p style='font-size:12px;color:#151D99'><b>".$detailSpec[titleDescrip]."</b></p>
  if($detailSpec[salePrice]!= 0)
     echo $detailSpec[salePerc]."% OFF";
  echo "</p></div></a>";

Im sure its something obvious, but i can't figure it out.

Edited by Du-z: n/a

7 Years
Discussion Span
Last Post by Zagga

Hi Du-z,

Does the site you linked to contain the code you are having problems with? I have refreshed the page repeatedly and the item text (in the Hot Items section) always shows in blue (with the prices in black) but there are no images shown.
You do have lots of validation errors on the page (including no starting <html> tag) though.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.