[Current project can be viewed at http://80.193.62.89/AmmoBox/index.php]
For my current project i had to change my system of differnt pages like index.php member/memberindex.php admin/adminindex.php i am having to do it so the url is like index.php?page=members/memberindex and I have never done it like this so have come accross a problem
I have a login page and this creates some sessions and then moves the user to memberindex and the url is index.php?page=members/memberindex&do=login (it was ?do=login but this didnt work and & does..i dont no if thats important)
and is simply like this
if ($level != "1")
{ $auth = "yes"; }
else { $auth = "admin"; }
header("Location: index.php?page=members/memberindex.php");
but i get this error (line 58 is the line header("Lo...) line 5 is the session script bellow
Warning: Cannot modify header information - headers already sent by (output started at d:\program files\apache group\apache\htdocs\ammobox\index.php:58) in d:\program files\apache group\apache\htdocs\ammobox\members\memberindex.php on line 5
I also get the same error with just these and no other header being sent
<?php
session_start();
if (@$auth != "admin")
{
header ("Location: index.php?page=memberlogin");
exit();
}
?>
Can anyone advise on how I can get around this. Also but not essential to this post, if you see why my little script there wouldnt work, please tell me I am having problems with it, but its not the vital thing at min so dont worry too much
Thanks
Chris