simon1901 Posted September 2, 2013 Share Posted September 2, 2013 (edited) I realy don´t understand whay it don´t working. It is some problem with header. <?php require_once 'includes/constanses.php'; session_start(); if (empty($_SESSION['brukernavn']) || empty($_SESSION['passord'])) { header("Location: loginpage.php"); } elseif ($_SESSION['passord'] != BRUKERNAVN && $_SESSION['passord'] != PASSORD) { header("Location: loginpage.php?status=Feil brukernavn eller passord"); } else { ?> <?php require_once 'includes/db123.php'; require_once 'includes/db_conn.php'; echo "4"; ?> <?php echo "5"; if(isset($_GET['id'])){ echo "6"; $info = select_by_id($_GET['id'], $con); header("Location:https://login.lodo.no//lodo.php?DB_NAME_LOGIN={$info['1']}&username={$info['2']}&password={$info['4']}&t=lib.login"); } else{ echo "7"; header('Location: index.php'); } }} require 'includes/footer.php'; ?> I error is the attach. Edited September 2, 2013 by simon1901 Quote Link to comment https://forums.phpfreaks.com/topic/281797-php-header-problem/ Share on other sites More sharing options...
fastsol Posted September 2, 2013 Share Posted September 2, 2013 Can u translate the error to English please since most of us can't read it Quote Link to comment https://forums.phpfreaks.com/topic/281797-php-header-problem/#findComment-1447892 Share on other sites More sharing options...
objnoob Posted September 2, 2013 Share Posted September 2, 2013 500 is a clue. internal server error Quote Link to comment https://forums.phpfreaks.com/topic/281797-php-header-problem/#findComment-1447894 Share on other sites More sharing options...
cyberRobot Posted September 3, 2013 Share Posted September 3, 2013 Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. More information can be found here: http://php.net/manual/en/function.header.php Quote Link to comment https://forums.phpfreaks.com/topic/281797-php-header-problem/#findComment-1447955 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.