0) { header("Location: " . mysql_result($q, 0, 0)); } else { die("Invalid ad."); }