PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
bumple
Forum Commoner
Posts: 34 Joined: Thu Jan 08, 2004 4:38 am
Post
by bumple » Sat Jan 10, 2004 3:29 am
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.
devork
Forum Contributor
Posts: 213 Joined: Fri Aug 08, 2003 6:44 am
Location: p(h) developer's network
Post
by devork » Sat Jan 10, 2004 3:57 am
the same script worked for me!
compare $logged_in with string variable.
$logged_in=="logged_in"
bumple
Forum Commoner
Posts: 34 Joined: Thu Jan 08, 2004 4:38 am
Post
by bumple » Sun Jan 11, 2004 2:41 am
I don't quite understand what you mean?
Nay
Forum Regular
Posts: 951 Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia
Post
by Nay » Sun Jan 11, 2004 2:46 am
Instead of doing all that, check for $logged_in first by outputting it.
-Nay