PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Click Here
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old March 17th, 2004, 03:39 PM
linkyguy linkyguy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Norfolk, UK
Posts: 5 linkyguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHPSESSID not defined

Hi,

I run win XP and apache 2.0.43. When I use $PHPSESSID I get an error as below. Can anyone tell me why I get it?

Notice: Undefined variable: PHPSESSID in Cocuments and SettingsJamesMy Documentsmy websiteaddtocart.php on line 23

Reply With Quote
  #2  
Old March 17th, 2004, 03:51 PM
opus006 opus006 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 65 opus006 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: PHPSESSID not defined

Quote:
Notice: Undefined variable: PHPSESSID in Cocuments and SettingsJamesMy Documentsmy websiteaddtocart.php on line 23


You are not assigning a value to the variable before you use/test it.

I am guessing you are using sessions, and have called
session_start(). You can then load the value from the $_SESSION array.
php Code:
Original - php Code
  1.  
  2. $PHPSESSID = $_SESSION['PHPSESSID'];


Reply With Quote
  #3  
Old March 17th, 2004, 04:04 PM
Blindeddie Blindeddie is offline
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: NJ - USA
Posts: 2,152 Blindeddie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: PHPSESSID not defined

you could also use

$PHPSESSID = session_id();


Reply With Quote
  #4  
Old March 17th, 2004, 04:06 PM
linkyguy linkyguy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Norfolk, UK
Posts: 5 linkyguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: PHPSESSID not defined

Hi Opus,

Thank you for your reply

I put the code you suggested straight after the
php Code:
Original - php Code

line and then got the error below when I ran it

Notice: Undefined index: PHPSESSID in Cocuments and SettingsJamesMy Documentsmy websiteaddtocart.php on line 3

Reply With Quote
  #5  
Old March 17th, 2004, 04:10 PM
linkyguy linkyguy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Norfolk, UK
Posts: 5 linkyguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: PHPSESSID not defined

Blindeddie,

thanks for that, it resolved the notice, and the information is being added to the database as it should now

Many thanks

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > PHPSESSID not defined


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway