Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 18th, 2004, 07:59 AM
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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>";
}
?>

  #2 (permalink)  
Old May 18th, 2004, 04:39 PM
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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!



Similar Threads
Thread Thread Starter Forum Replies Last Post
session komalpriya .NET Framework 2.0 4 October 30th, 2007 09:16 AM
session lakshmi devi Classic ASP Basics 4 July 20th, 2006 04:33 AM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM
session help -Dman100- Classic ASP Basics 1 November 29th, 2004 12:45 AM
About Session mani_he Beginning PHP 7 September 18th, 2004 03:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.