473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

empty session-variable

Uwe
Hi,
in L147.php I want to register a variable and use it later.
Why do I get in L148.php a empty variable $ArtNr only? Has somebody an
idea? (register_global is deactive.)
Best reagrds Uwe

<? // L147.php
session_start();
$name=session_name();
echo $name;
$ArtNr=100101;
$_SESSION['ArtNr']=100101;
?>

<? // L148.php
session_start();
$name= session_name();
echo "Session-Name: ", $name,"<br>";
echo "Artikelnummer: ", $ArtNr,"<br>";
?>
Jul 17 '05 #1
2 4219
On 14 Mar 2004 03:47:55 -0800, un*****@web.de (Uwe) wrote:
in L147.php I want to register a variable and use it later.
Why do I get in L148.php a empty variable $ArtNr only? Has somebody an
idea? (register_global is deactive.)
If register_globals is off, and you're setting the variable through $_SESSION
(correctly), why do you then expect to be able to read it from a global
variable on the next page? Use $_SESSION['ArtNR'] again.
Best reagrds Uwe

<? // L147.php
session_start();
$name=session_name();
echo $name;
$ArtNr=100101;
$_SESSION['ArtNr']=100101;
?>

<? // L148.php
session_start();
$name= session_name();
echo "Session-Name: ", $name,"<br>";
echo "Artikelnummer: ", $ArtNr,"<br>";
?>


--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Jul 17 '05 #2
Uwe
Yes, you are right. It was a stupid mistake. Nevertheless heap thanks.
Jul 17 '05 #3

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

Similar topics

39
by: fleemo17 | last post by:
I'm wondering whether it's better to leave an alt tag blank (alt=" ") or specify something like "alt='spacer'" when referring to objects that merely help the layout of the page? -Fleemo
8
by: Ricky K. Rasmussen | last post by:
Hi NG, In a very large ASP.NET application i use popups for displaying diffrent kinds of dialogs. But sometimes when a Popup is opened it's like the aspx page is never executed and the popup...
0
by: Mariame | last post by:
Hello Everyone i have a session for username & i check every page that : if session("username")="' then response.redirect("Login.aspx") the problem is everytime the user refresh the page the...
1
by: Adam Barker | last post by:
Hi all, I have an ASP.NET site running on port 888, but it doesn't seem to save anything in the Session object. This only happens when I reference the site using the machine name instead of...
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
0
by: A/Fatah Dayib | last post by:
Hi! Thank you in advance. Here is the VB.net code that I was supposed to populate data on strong typed PurchaseRpt Report.The report is running no problem but does not display any data.If I...
12
by: robertino | last post by:
Hi all, I've put together a few SPs to produce a BOM (bill of materials) listing, which together use a couple of global temp tables, and return the results from a cursor. Here's the code: ...
3
by: Haleigh | last post by:
I just started a few days ago, so I'm very new to this. I'm trying to update a gridview using a store procedure. When I am in the update subroutine, newvalues and oldvalues are empty, plus count is...
2
by: ronchese | last post by:
I'm noticing this since I started developing a website project: my session variables are getting empty! I did a real easy test, and I checked my session variable is getting empty!! What is...
2
by: ganesh22 | last post by:
Hi, Iam using like this string gs=Session.ToString(); but in my code Session is empty so its giving some runtime error now i want to give condition that if session is empty i want to do...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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...
0
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
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,...
0
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...

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.