Wade Smart wrote:
> 
> 
> Wade Smart wrote:
>  > William Piper wrote:
> 
>  >> what does print_r($_SESSION); show?
>  >
>  > 20080724 1508 GMT-6
>  >
>  > Nothing. Its shows nothing.
>  > session_start() is the first line and Im not doing anything I haven't 
> done
>  > before. I'm clearing my cache (which shouldn't affect this) to see if 
> it helps.
>  >
>  > I'm a bit puzzled.
>  >
>  > Wade
> 
> 20080724 1516 GMT-6
> 
> I wiped my cache and deleted my cookies. Now print_r() shows the correct 
> values.
> Funny thing: still evaluating wrong.
> 
> page1.php
> if($key === $u && $code === $p){
> $_SESSION['authorized'] = "yumyum" ;
> header("Location: page1.php");
> 
> page2.php
> if($_SESSION['authorized'] != "yumyum" ) {
> header("Location: http://www.google.com <http://www.google.com>");
> }
> 
> print($_SESSION)
> 'authorized' = "yumyum"
> 
> I must be losing it today as this cant be that hard :)
> 
> Wade
> 

Here are a few points to throw out there:

- I don't know if that was a typo or what, but you have:
header("Location: page1.php"), so wouldn't that point to itself instead 
of page2?

- Are $u and $p boolean? If not you should be using == instead of ===

- On page2, you will only go to google if yumyum is NOT in session.

bp


Reply via email to