General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 27th, 2003, 10:20 PM
kenny873 kenny873 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 4 kenny873 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
session_register or $_SESSION

I am using PHP 4.3 (the latest php)

i have heard that we should use $_SESSION rather than session_register to register a session...is it true?

also I should no longer use session_is_registered() or anything alike....i should use isset($_SESSION()) instead....

can anyone give comments about the usage of session in PHP4.3 or the latest version...

AND, a big problem, i ran the following code and it is not working until i refresh it for few or more times...it said that DNS error and server is not found...why's that?

<?php
session_start();

$fromPage = "/kenny/item_details.php";

if (isset($_SESSION['userid'])){

?>
okay , YOU ARE LOGGED IN !!!
<a href="/kenny/TestSession/logout.php"> LOGOUT </a>
<?
} else {
?>
Not okay, You are not logged in !!!
<? } ?>

Reply With Quote
  #2  
Old February 28th, 2003, 01:11 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 650 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 34 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
I would recomend using $_SESSION[] just for ease of use..

and if you do use $_SESSION[] you are right, you will need to use isset($_SESSION[])

Not sure why that code isnt working, unless you're not setting $_SESSION['userid'] = something in another part of the code.. as long as you're setting $_SESSION['userid'] to a value then it should work..

Reply With Quote
  #3  
Old January 26th, 2013, 03:24 PM
ImmimuffVib ImmimuffVib is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Location: USA
Posts: 1 ImmimuffVib User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 23 m 40 sec
Reputation Power: 0
Send a message via AIM to ImmimuffVib Send a message via MSN to ImmimuffVib Send a message via Yahoo to ImmimuffVib Send a message via Skype to ImmimuffVib
Facebook MySpace
I'll be more than willing to

Thank You!

Reply With Quote
  #4  
Old February 8th, 2013, 08:29 AM
gopikumar10 gopikumar10 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Location: punjab
Posts: 1 gopikumar10 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m 59 sec
Reputation Power: 0
thanks for giving me that knowledge about the sessions....

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > session_register or $_SESSION


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap