Terion Miller wrote:

> So now I have SESSIONs set: user, AdminID, AdminLogin
> 
> but I'm trying to use them without showing them in links...currently the
> pages only load if I make the links like this:
> 
> <a href="Welcome.php?AdminID=<?php echo $_SESSION['AdminID']; ?>"
> target="mainFrame">Home</a>
> 
> I thought the whole purpose of having/using Sessions is to not have to
> pass variables in url's, but if I remove the session in the link above
> when I click to it, It logs me out, even though it IS holding the SESSION
> (which I checked by revealing my variables) so I guess I am confused about
> this bit of code, I think its saying if the SESSION is there great if not
> logout... but even when I expose the variables and see that the session is
> passing from page to page it keeps sending me to the logout page:
> 
> This is how it was originally written:
> if (empty($_SESSION['AdminLogin']) || $_SESSION['AdminLogin'] !=  true){
>     header ("Location: LogOut.php");
>     $_SESSION['user']=$UserName;
>     $_SESSION['AdminID']=$AdminID; <--*I added this one originally the
> script only used 'user' and 'AdminLogin'* but passed them in urls
> }
> 
> 
> Is the above part not needed since the Session is already active? Should I
> be not using the header part (honestly I havent read up on that chapter
> yet)

Are you using session_start()? 


Cheers
-- 
David Robley

The Hubbell works fine; all that stuff IS blurry!
Today is Boomtime, the 32nd day of Chaos in the YOLD 3175. 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to