473,508 Members | 2,360 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What might be the reason to get different values for session id in php?

5 New Member
I am getting different session ids in these two pages,so that in the second page it is not identifying the session variable.

I tried to execute the code given below
My first page is:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. session_start();
  3. echo session_id();
  4. $_session["TstCycID"]='23';
  5. echo $_session["TstCycID"];
  6. ?>
  7. <BR><A HREF = "summary.php"> Execution Summary </A>
  8.  
Second page is:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  session_start();
  3.  echo session_id();
  4.  echo $_session["TstCycID"];
  5. ?>
Feb 1 '11 #1
5 1390
Markus
6,050 Recognized Expert Expert
Variables in PHP are case-sensitive. $_SESSION != $_session.
Feb 1 '11 #2
Rinson Mathews
5 New Member
Thanks for your reply........
But here I am using only small letters....
Feb 2 '11 #3
Niheel
2,456 Recognized Expert Moderator Top Contributor
What markus is trying to tell you is that you can't access the session variable by using

$_session["TstCycID"];

You have to use

$_SESSION["TstCycID"];

This is where session data is stored

Because PHP variables are case sensitive $_session is not the same as $_SESSION.

:)
Feb 2 '11 #4
Rinson Mathews
5 New Member
Wow... the issue got resolved...........
Thank you very much........
Feb 2 '11 #5
Prakash Gnana
25 New Member
I agree with the answer of Niheel..
Feb 2 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

10
9920
by: ios | last post by:
Hi Can someone tell me what is different between below case? strcpy(eventname, "MDCX_RSP"); and sprintf(eventname, "MDCX_RSP"); Thanks, Leon
3
1476
by: Alan | last post by:
Hi, is it possible to create a project that can offer different members of a Public Enum according to a condition ? I mean, Project A has a public enum. Project B & C access A's enum. However B...
0
1053
by: mburghdorf | last post by:
Does anybody know how to populate a combobox in a datagrid with different values per row. Per column isn't a problem but for some reason I can't figure out how to do it per row.
3
3317
by: chalres | last post by:
what is different between session and session token? that's i need to know...is it called Session?
3
2942
by: =?Utf-8?B?ZWxhZGxh?= | last post by:
Hi. I was wondering if it was possible to give a variable different values depending on if the code was compiled in debug or release? i.e. if the code was compiled in debug: string...
3
3220
by: ago | last post by:
Hi, Is there any way to compare two identical table structures in access for different values in them. EG: Table 1: Name occupation rob plumber Table 2: Name occupation
1
1148
by: Marks | last post by:
Still playing around with Access. Is there a way to format in my case changing the colour of a piece of text in Form/Report View under different values. A random example would be "Access Denied"...
5
4079
by: =?Utf-8?B?QW5kcmV3?= | last post by:
Hello, friends, I am testing our website (in 2003.net, c#) application. Sometimes there more values in Querystring, like ...
3
6408
by: shalskedar | last post by:
I want to insert different values in each worksheet i.e every worksheet should 've different values.I tried the below code but i m not able to set the range for a particular worksheet For ex-For...
4
1635
by: needanswer | last post by:
Is possible to have different values of combobox on the multi same form? Actually I want to make a multi same form, but with one combobox to set the authority. When different persons to use this...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7489
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.