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

Got A Free Server :(
So I was given a free server

http://shopping.yahoo.com/p:Compaq%20ProLiant%201500%20Server:1

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

Help with file_get_html
The following code gives the expected results:

<html>
<head&g

why isn't this PHP code working ???
it's suppose to find a name on the database.

<?php

$s = $_POST["lname&

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

array & querys help/advice.
Ok so here goes , I have a mysql database and basically here's what I need to do.

// foreach

Guixt issue
Hello all,

We are experiencing the following problem with Guixt:

Some transact

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

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