each blue div with a “y” should also have a yellow box, but the opposite is happening and I can’t find the mistake.
See script in action at:http://www.lincolnsrealdeals.com/util3.php
<?php
include_once "connect_to_mysql.php";
$result = mysql_query("SELECT * FROM stk WHERE (id = 3) OR (id = 4) OR (id = 5) OR (id = 6)") or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
$this_loc_only = $row['this_loc_only'];
echo '<div style="height:200px;width:200px;margin:20px;background-color:cyan;">';
if ($this_loc_only == "y") {
echo '<h6 style="float:left;margin:-216px 0px 0px 3px;background-color:yellow;width:55px;text-align:center;">This location only.</h5>';
echo $this_loc_only . '</br>';
}
echo '</div>';
}
?>