Hi all
I have an include.php page that checks for session variables set as:
<?php
if ((isset($SESSION['a']) && $SESSION['a'] != " ") &&
(isset($SESSION['b']) && $SESSION['b'] != " ") &&
(isset($SESSION['p']) && $SESSION['p'] == 1)) {
} else {
header("Refresh: 3; URL=index.php");
echo "Wrong user name or password. Sending you back to login page<BR>";
echo "If you do not return to login page, click here " . "<ahref=\"index.php\">
Click Here</a>";
echo "<br>";
die();
}
?>
From the admin page I can go to a form for adding an admin user. Both pages have the include.php directly after the session_start() and work ok, but when I try to add the new user which takes me to the insert admin user page I get an error message:
Warning: Cannot modify header information - headers already sent by (output started at c:\Inetpub\wwwroot\sps\inccheck.php:12) in c:\Inetpub\wwwroot\sps\insertadminuser.php on line 18
Any suggestion please?
Many thanks