include ("inc/config.inc.php"); $query = "select * from impostazioni"; $result = mysql_query($query, $db); while ($row = mysql_fetch_array($result)) { $code = $row['code']; $redir = $row['redir']; } if ($code == $attivazione) { //header('HTTP/1.1 301 Moved Permanently'); //opzionale header("Location: $redir"); exit(); } ?>