0) { while ($row = mysql_fetch_assoc($result)) { $action_url = $cactiurl."/graph_view.php?action=preview&host_id=".$row["host_id"].""; } header("Location: ".$action_url); } else { die("Host not found, sorry..."); } # Close the DB session mysql_free_result($result); mysql_close($link); ?>