473,662 Members | 2,575 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 1399
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
9937
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
1482
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 should see some elements of the enum while C should see others... Is this achievable ??
0
1062
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
3326
by: chalres | last post by:
what is different between session and session token? that's i need to know...is it called Session?
3
2952
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 strConnection = "Server1"; if the code was compiled in release: string strConnection = "Server2"; Thanks!
3
3229
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
1154
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" would show in Red and "Access Granted" would be in Green. Thanks and Merry XMas to All!
5
4086
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 http://www.xxxxxx.com/webpage1.aspx?mc_gross=69.90&address_status=confirmed&item_number1=42&item_number2=43&payer_id=FDUB8TPHR7ZHA&tax=0.00&...... However, if the number of different values in query string is more than 44, we got error from IE, saying
3
6415
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 Sheet1 iwant to set the range as "A1:A4" with values as 10,20,30,40 But don't know how to set this for different cells. Similarly For Sheet2 iwant to set the range as "b1:b4" with values as 100,200,300,400 If a workbook contains 10 such...
4
1644
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 same form, I will have different selection limited on this combobox, is possible? How? Thanks.
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4180
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1752
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.