Every once in a while, I get this error:
Warning: Cannot modify header information - headers already sent by (output started at top.inc.php:15) in gameinfo.php on line 28
Here is the code, anyone know what I can do?
<? include("include/top.inc.php") ?>
<br><br>
<?php
$id = $HTTP_GET_VARS["gameid"];
if (is_numeric($HTTP_GET_VARS["gameid"])=="True")
{
$mysql_database="db";
$mysql_username="user";
$mysql_password="pass";
$link = mysql_connect("localhost",$mysql_username,$mysql_password) or die ("Unable to connect to SQL server");
mysql_select_db($mysql_database,$link) or die ("Unable to select database");
$qstr = "SELECT * from Games where id = $id ";
$result = mysql_query($qstr);
if (mysql_num_rows($result))
{
$name = mysql_result($result,0, "Name");
$url = mysql_result($result,0, "GameURL");
echo "<b>The name:</b> $name<br>";
echo "<b>The url:</b> $url<br>";
}
else echo "<center><h4>ERROR!</h4>Unable to find game with that ID number.</center>";
mysql_close();
} else {
header("Location: games.php");
}
?>
<br><br>
<? include("include/bottom.inc.php") ?>