$query = "SELECT thecode FROM trackingcode LIMIT 1"; $result = mysql_query($query); if ($row = mysql_fetch_array($result)) { $thecode = $row['thecode']; print $thecode; } ?>