Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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>";
}
?>

Reply With Quote
  #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!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:38 AM.


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