Hi there. I have an include statement that is conflicting with my program. In the statement below you can see if I comment out the include statement the IF statements work. If I place the include statement back into the program the IF statements don't calculate anything and the program continues. I need some help. Why is this happening???
if(!$getuserline[realname])
{
header("Location: login.php");
}
else
// {
// include ("navibar.inc.php");
//
// }
if($radiogo =="insert")
{
header("Location: shipsingle.php");
}
elseif($radiogo =="update")
{
header("Location: static.php");
}
elseif($radiogo =="viewall")
{
$query= "SELECT * FROM shiplist WHERE quantity > 0 AND store = '$store' ORDER BY date";
mysql_query($query) or print(mysql_error());
$getstorearray=mysql_fetch_array($query, MYSQL_ASSOC) or print(mysql_error());
echo $getstorearray;
}
insert statements
Moderator: General Moderators
-
Illusionist
- Forum Regular
- Posts: 903
- Joined: Mon Jan 12, 2004 9:32 pm
Does navibar.inc.php output anything? If so then you won't be able to do any header("Location's after it as you can redirect using header after output has been sent.
Try putting error_reporting(E_ALL) at the very top of the script, it will throuw out alot of warning that you should fix, such as doing if(!$getuserline[realname]) .. it will warn you about an undefined constant as it expects you to use $getuserline['realname'] .. and it might also highlight where the problem is.
Try putting error_reporting(E_ALL) at the very top of the script, it will throuw out alot of warning that you should fix, such as doing if(!$getuserline[realname]) .. it will warn you about an undefined constant as it expects you to use $getuserline['realname'] .. and it might also highlight where the problem is.