help, header() is not working!


Posted on 16th Feb 2014 07:03 pm by admin

Hello, I have this code:


<?php

/**
* @author samoi
* @copyright 2009
*/

error_reporting(E_ALL & E_NOTICE);

include ('func.php'); // this has the session_start() func!

if (isset($_SESSION["uid"])) {


$_SESSION["uid"]+= 1;

} else {

header('location: login.php'); // it's not redirecting! it gives a white page only!
die(); // I run this die() and error_reporting() to debug, but no chance!
}

echo $_SESSION["uid"];
echo '<br />';
echo '<a href="logout.php"> LogOut </a>';
?>



it works if it's in ongoing session!
but fails if no session in there, it does not work "header()" !


Thank you in advance!

No comments posted yet

Your Answer:

Login to answer
245 Like 44 Dislike
Previous forums Next forums
Other forums

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

Why does my php page download images over and over
Can anybody please explain to me why my php page keeps downloading the images and other items every

Help with email validation please...
Hi,
Please could you help.
I have a register.php login page where users register, the detail

Echo multiple lines of html code
Hi guys,

I would like to know if there is a way to echo multiple lines of html codes.

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows

SQL>

user data not transferring to new page
I'm a PHP learner. After an index.php page, the user goes to a login.php page. Both pages seem to

Rss feed question
Hi

My blog and my website are different. Am i able to take my rss feed
from my blog and p

PHP using IF to display error
i have a MySQL query and i want to display 1 thing only if the number of affected rows is >=1

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash