Jump to content

[SOLVED] stupid mistake


lewis987

Recommended Posts

can anyone please help me? im have a little bit of bother with the header function

 

what im trying to do is check whether the software is install, if not then redirect to the install page, and checking to see if the user has loged in or not, if not redirect to the login page, here is my code

 

if($install != '1'){
$installhead=header("location: install.php");
echo $installhead;
exit;
}
if(isset($_GET['forum']))
{
if(!session_is_registered("username")){ // if session variable "username" does not exist.
header("location:?login"); // Re-direct to index.php
}
include 'files/forum.php';
exit;
}
elseif(isset($_GET['viewcat']))
{
if(!session_is_registered("username")){ // if session variable "username" does not exist.
header("location:?login"); // Re-direct to index.php
}
include 'files/viewcat.php';
exit;
}

 

as you can see there are 3 header sendings. im trying to make it to check whether the user has logged in or not without using cookies (mainly because i dont know how to use them yet as ive only been coding for about a month)

 

so anyone?

Link to comment
https://forums.phpfreaks.com/topic/55132-solved-stupid-mistake/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.