I'm hitting my server really hard because of a bug somewhere in the following code:
$qqq = mysql_query("SELECT * FROM coupons WHERE dateExp > CURDATE()");
$isExpired = array();
while($row = mysql_fetch_array($qqq))
{
$isExpired[] = $row;
}
foreach($isExpired as $exp)
{
if($exp['id'] == $coupID)
{
$expiredConf = 1;
}
}
if($expiredConf == 1)
{
echo "<link rel='stylesheet' href='grey.css' type='text/css' />";
}
else
{
echo "<link rel='stylesheet' href='coupStyle.css' type='text/css' />";
}
I've written code like this a hundred times, and I've compared it to my old examples, but I can't figure out what caused such a major problem.