This script I am currently working on is the following
<?php
include"functions.php";
$spell = $_GET['spell'];
$spinfo2 = mysql_query("SELECT * FROM spells WHERE nos='$spell'") or die(mysql_error());
$spinfo = mysql_fetch_array($spinfo2) or die(mysql_error());
$counts2 = mysql_query("select count(*) as spellname FROM spells WHERE nos='$spell'") or die(mysql_error());
$counts = mysql_fetch_array($counts2) or die(mysql_error());
if (!$spell) {
echo "Spell is blank<br><br><br><br><br>";
include "footer.php";
}
else {
include "header.php";
echo $spell;
}
?>
All I am doing is asking it to see if the variable in the nav bar is blank. If it is it should say that it is blank, but it it is not blank it should echo the spell name. Well if it is not blank it echos the spell name, but if it is blank all that shows is a white page. What is wrong with it?