0 && $state != "click"): mysql_db_query("freschinfo", "UPDATE adstats SET impressions=impressions+1 WHERE (codenumber='$codenumber' and whatdate='$today')"); endif; /* if clicked on, update the clicks and relocate to the proper website */ if ($state="click"): mysql_db_query("freschinfo", "update adstats set clicks=clicks+1 where whatdate='$today' and codenumber='$codenumber'"); header ("Location: $website\n\n"); endif; ?>