473,586 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session_name

Hi

Is is possible to set the session_name using a defined constant?

For example

session_name(UN IQUE_NAME);

where UNIQUE_NAME is defined in another file

define('UNIQUE_ NAME', 'MRKLB');

Jul 17 '05 #1
4 1830
bi*******@gmail .com wrote:
Is is possible to set the session_name using a defined constant?

For example

session_name(UN IQUE_NAME);

where UNIQUE_NAME is defined in another file

define('UNIQUE_ NAME', 'MRKLB');


Did you try?

<yoda>
Do or do not. There is no try
</yoda>

So I guess you did the above and failed?

Jul 17 '05 #2
Why would I not listen to starwars wisdom?

Of course I tried and it didn't work

Jul 17 '05 #3
bi*******@gmail .com wrote:
Why would I not listen to starwars wisdom?

Of course I tried and it didn't work


How comes it works for me then?
http://tmp.tryba.nl/sessname.php(s)

Jul 17 '05 #4
I believe you have to set the session id before any html is output on
the page (following the same rules as cookies).

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2571
by: Darrell Blake | last post by:
I'm trying to use sessions to allow people to log into my site. The problem is that sometimes it works and sometimes it doesn't! As far as I'm aware my script is fine (hence why it works sometimes) and I've had people tell me it's fine too. Basically, when a user enters their username and password it checks that against my mysql database and...
0
4019
by: Darrell Blake | last post by:
I'm trying to use sessions to allow people to log into my site. The problem is that sometimes it works and sometimes it doesn't! As far as I'm aware my script is fine (hence why it works sometimes) and I've had people tell me it's fine too. Basically, when a user enters their username and password it checks that against my mysql database and...
4
31178
by: john | last post by:
How do u guys handle multiple sessions?? i.e, opening different browser windows by running iexplore.exe or clicking IE icons and opening the application. My sessions are mixing up. what i mean is suppose i log in my site using username "test". At this time I set $_SESSION="test". And I use $_SESSION inside my application to print the...
2
3537
by: Ken | last post by:
How do I carry Session variables between secure website (https) to unsecured website(http)? Ken
21
3049
by: axlq | last post by:
Someone please tell me if I've discovered a PHP bug. I'm sitting in front of several computers on my home network, behind a NAT firewall/router. I am testing my web site on these different computers (running different browsers, logged in as different users, etc.). My web site keeps track of users logged in through the use of $_SESSION. ...
25
3307
by: crescent_au | last post by:
Hi all, I've written a login/logout code. It does what it's supposed to do but the problem is when I logout and press browser's back button (in Firefox), I get to the last login page. In IE, when I press back button, I get to the page that says "Page has Expired" but Firefox does not do this. I think it's something to do with sessions...
5
4009
by: manny6677 | last post by:
Trying a simple test of passing $_SESSION variables between two php pages. I don't see any data on the second page and the session id that is printed out is not the same as the first page session id of the same SESSIONSAMPLE name, which I think is the problem. When I refresh either page the session id constantly changes as well which doesn't...
5
3082
by: salmankamkoriwala | last post by:
Default Working with Sessions in Multi Tab Browsers - PHP Hi, I am working on the php project and been stuck on Managing Session in Multiple tabs. My Problem is --- When i open a page in firefox window i store the id of product in session and then manage all stuff related to that product with that session i.e. edit, delete, add...
2
1408
by: sheldonlg | last post by:
I wanted to see if absolute or relative URLs had anything at all to do with the session variable information being lost. So, I wrote a simple test program. It is at www.sheldonlg.com/headertest/index.php. The results were not what I expected. BOTH ways lost the session information. All this test application does is call session_name to...
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
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...
0
8215
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...
0
6610
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...
0
5390
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1179
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...

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.