lewis987 Posted June 11, 2007 Share Posted June 11, 2007 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 More sharing options...
B34ST Posted June 11, 2007 Share Posted June 11, 2007 take a look at the Header Problems Section Link to comment https://forums.phpfreaks.com/topic/55132-solved-stupid-mistake/#findComment-272614 Share on other sites More sharing options...
lewis987 Posted June 11, 2007 Author Share Posted June 11, 2007 solved, making it a little different setup Link to comment https://forums.phpfreaks.com/topic/55132-solved-stupid-mistake/#findComment-272633 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.