p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   Session Help!! (http://p2p.wrox.com/showthread.php?t=13109)

kdesilva May 18th, 2004 07:59 AM

Session Help!!
 
I have some code that changes links once the user logs in, however it's not working properly. For example there is a link called "Register" (with the url/register.php) that should change to Member Area (with the url /member.php) once there is a valid session (the user has logged on) .. however it's not working, perhaps someone can see an error in the code?

This is for the Session check:

<?

if (!$special_mode)
{
$is_mem = $_SESSION["valid_user"];
?>

This is to do the switch:

<?
if ($is_mem <> "")
{
echo "<a href=\"http://$url/member.php\">$la_member_area</a>";
}
else
{
echo "<a href=\"http://$url/register.php\">$la_reg</a>";
}
?>


kdesilva May 18th, 2004 04:39 PM

Nevermind I fixed it - thanks for nothing though!

Turns out I only hav PHP 4.0.6 which doesn't support $_SESSION and I had to use $HTTP_SESSION_VARS - ugh!



All times are GMT -4. The time now is 05:37 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.