Page 1 of 1

What on earth is wrong...??

Posted: Sat Jan 10, 2004 3:29 am
by bumple
hi, thanks for all your help...but how come this doesnt work?:



<?php
if($logged_in == 0) {
$location = "login_success.php";
header("location: ".$location);
} ?>


I know for a fact on that that $logged_in does equal 0.

this if statement doesnt work either:

<?php
if($logged_in == 0) {
header("Location:login_success.php");
} ?>


What could possibly be wrong? Thanks a lot!

-bumple.

Posted: Sat Jan 10, 2004 3:57 am
by devork
the same script worked for me!

compare $logged_in with string variable.

$logged_in=="logged_in"

Posted: Sun Jan 11, 2004 2:41 am
by bumple
I don't quite understand what you mean?

Posted: Sun Jan 11, 2004 2:46 am
by Nay
Instead of doing all that, check for $logged_in first by outputting it.

-Nay