Hi,
As you have recommended I did not use the session_registe r(). In one
file I have executed such line:
$_session['ex'] = 2.0;
Then, in another file, I have executed the following line:
$ex = 3.0.
And than I have noticed that the previous assignment is seen
everywhere (on other pages). So, as far as I understood, after the
usage of $_session['ex'] = 2.0, the $ex variable becomes a session
variable. Moreover, $ex and
$_session['ex'] variables are the same variable! In other words, I
have to call $_session['ex'] just the first time. After I did it once
I can use just $ex (instead of $_session['ex']). Is that true? 34 5613
Kurda Yon wrote:
Hi,
As you have recommended I did not use the session_registe r(). In one
file I have executed such line:
$_session['ex'] = 2.0;
Then, in another file, I have executed the following line:
$ex = 3.0.
And than I have noticed that the previous assignment is seen
everywhere (on other pages). So, as far as I understood, after the
usage of $_session['ex'] = 2.0, the $ex variable becomes a session
variable. Moreover, $ex and
$_session['ex'] variables are the same variable! In other words, I
have to call $_session['ex'] just the first time. After I did it once
I can use just $ex (instead of $_session['ex']). Is that true?
No. $_SESSION['ex'] (NOT $_session['ex'] - case IS important!) just
sets the value in the array. Nothing more, nothing less.
$ex is a completely different variable, completely unrelated to the
value in the $_SESSION array.
It's no different than having $abc and my_array['abc']. Two entirely
different variables.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
"Jerry Stuckle" <js*******@attg lobal.netwrote in message
news:7L******** *************** *******@comcast .com...
Kurda Yon wrote:
>Hi,
As you have recommended I did not use the session_registe r(). In one file I have executed such line: $_session['ex'] = 2.0;
Then, in another file, I have executed the following line: $ex = 3.0.
And than I have noticed that the previous assignment is seen everywhere (on other pages). So, as far as I understood, after the usage of $_session['ex'] = 2.0, the $ex variable becomes a session variable. Moreover, $ex and $_session['ex'] variables are the same variable! In other words, I have to call $_session['ex'] just the first time. After I did it once I can use just $ex (instead of $_session['ex']). Is that true?
No. $_SESSION['ex'] (NOT $_session['ex'] - case IS important!) just sets
the value in the array. Nothing more, nothing less.
$ex is a completely different variable, completely unrelated to the value
in the $_SESSION array.
It's no different than having $abc and my_array['abc']. Two entirely
different variables.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
What an idiot! He tested and they are related - that's a fact. How many
times I told you in other threads the same thing?
I have never called you an idiot in those other threads, but finally there
is a limitation. It's okay to be an idiot, but don't come to this forum to
confuse others.
Your observationb is absolutely accurate!
Yes, you are can use either $_SESSIN["a"] and $a, and they mean the same
thing when globals are registered.
Have said that, it does not mean that I promote it, on the contrary, I have
to tell you that it is absolutely a bad practice, and I expect that this
magic will go away entirely.
How long have you been using PHP? I only started to read my first PHP book
last weekend. Oh man, you are kidding me... That's why Hillary's experience
argument is so weak.
Trust yr own testing and judgement first, and be very careful what you hear
in this forum.
If your knowledge violates testing result, go update your knowledge, don't
dig deeper.
the OP has been diligently testing and trying, and the best you can do is to
dis his ideas with baseless words. God bless the OP.
I should have been nicer. There was no point to lash out on you just because
you didn't know things. Peace!
But facts are facts. Go learn more about session, to be precise how php
handles it. Learn before start teaching. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Shelly |
last post by:
I set a session variable on error in the login page and then call the login
page again. I test on that session variable but it shows as not set. I
checked with an echo immediately after setting the error session variable so
I am 100% positive that it is set. The recursive entry to the login page
echos a message that the error session variable is unset.
Any clues?
Here is the setting code and the testing code (commented out)"...
|
by: doltharz |
last post by:
Please Help me
i'm doing something i though was to be REALLY EASY but it drives me
crazy
The complete code is at the end of the email
(i mean newsgroup article),
i always use Option Explicit
and Response.Expires=-1,
|
by: Gvnn |
last post by:
Hi,
I've few problem with Session Variables and WebServices.
I've a web application (.aspx), and I assign a Session variable ( ex:
Session.Add("COD",Value) ). Then I call a WebService. I need that the
service read the value of the session variable, but if i try i retrive a
null value.
Can anyone help me?
Thanks
|
by: Michelle A. |
last post by:
I have a four page form. Pages 1-3 stores there information in a session
variables. Page four is reached (a final review page) and then the
information will be written to the SQL server.
When I tried to enter some code in the HTML table by hand so I could get it
to show up in the right place. For example I use this code in the HTML
table:
<td><%=sessionvar1%><%=sessionvar2%></td>
|
by: +The_Taco+ |
last post by:
I already use session variable in my project to set a session timeout when
the user doesn't do anything for 10 minutes.
When I call other pages, I often use parameters in HREF link.
I was wondering if it was better to pass parameter from page to page as
session variable instead of doing it in HREF link?
Thx for the hint !
| |
by: Vidyadhar Joshi |
last post by:
I have the following scenario in a true load balanced environment (without
sticky sessions):
There are 2 ASPX pages. I want to pass an object from the first page to the
second page. On the btnContinue_Click event of Page1.aspx, I create the
object and store it in a session variable. The next statement would be
Response.Redirect("Page2.aspx"). The code appears like this:
private void btnContinue_Click(object sender, EventArgs e)
{...
|
by: lwoods |
last post by:
I am trying to pass some info to another page on my site. I set
"session_start()" in page 1, assign a session variable to a value, then
execute a "header('Location: ....')." But on the target page I don't get
any session variable values! BTW, I used a relative location in the
Location header, not an absolute URL. The behavior looks like it started
another session, but it should not have.
Ideas?
TIA,
|
by: Control Freq |
last post by:
Hi,
Not sure if this is the right NG for this, but, is there a convention
for the variable names of a Session variable?
I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any
guidance appreciated.
Regards
|
by: KDawg44 |
last post by:
Hi,
I have a variable I would like to put in the $_SESSION array.
However, I am not accessing this through a PHP script but am instead
returning this to a javascript function through an AJAX call. I need
to set this as part of the session. Can I either:
1.) Set the session variable within the script that is called through
the AJAX call. Will I be able to call for this on successive pages?
The page is accessed only through the AJAX...
|
by: KDawg44 |
last post by:
On Aug 2, 6:36 pm, KDawg44 <KDaw...@gmail.comwrote:
Okay, when I read my own question, I think #2 doesn't even make sense
since PHP is server side and js is client side. So, can #1 be done
properly?
Thanks.
|
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...
| |
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |