473,811 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to store session variables between visits?

My website gathers some data on its first page, which is used on other
pages. I would like to 'store' the data in some session variables between
visits, to prevent any problems that may occur if a visitor bookmarks a
different page.

What is the best way of achieving this? Can I store the values in a cookie
on the clients pc?

Thanks for any help given
N
Oct 31 '05 #1
5 1543
Why don't you and petesouthwest (php_king) do your homework together?
At least one of you might learn something. Or are you the same person?
The wording (even down to the puctuation) is exactly the same.

Oct 31 '05 #2
Hi

My partner (petesouthwest) and I seem to have upset people by asking the
same questions. We are both humbly sorry for our mistake, we were not aware
that this group and the Yahoo groups Pete uses have exactly the same
readership, or that posting the same question twice was morally and
intellectually unforgivable. In our haste to find answers to our questions
we have in the past, frequently posted in as many places as possible. In our
defence this normally results in unduplicated, valuable help. However, in
the future will restrict our questions to one post.

If someone could take the time to answer our question we would both be very
happy

N

"Ian B" <ia********@gma il.com> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.com...
Why don't you and petesouthwest (php_king) do your homework together?
At least one of you might learn something. Or are you the same person?
The wording (even down to the puctuation) is exactly the same.

Oct 31 '05 #3
Ian B wrote:
Why don't you and petesouthwest (php_king) do your homework together?
At least one of you might learn something. Or are you the same person?
The wording (even down to the puctuation) is exactly the same.

In case it is homework: Let's just help him/her.

http://nl2.php.net/manual/en/ref.session.php

;-)

Good luck!

Regards,
Erwin Moller

Oct 31 '05 #4
JDS
On Mon, 31 Oct 2005 11:47:43 +0000, Nicole wrote:
In our haste to find answers to our questions
we have in the past, frequently posted in as many places as possible


People are not necessarily "offended" but they probably ARE "annoyed".

1) Don't multipost!

2) Yahoo groups and Google groups use USENET (Well, Google Groups
certainly does!). What is Usenet?

http://en.wikipedia.org/wiki/Usenet

Later...
--
JDS | je*****@example .invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Oct 31 '05 #5
I posted a reply to this earlier (2-3 hours ago) - can't remember what
I said, and it might turn up sometime, but here's what I said to
petesouthwest (who posted the same petulant message as Nicole, but to
php_king - the only difference being that he said he'd have to go on
holiday while he waited for a reply)
-------
It's not trying to find an answer that is the problem, it's the
cross-posting. If someone takes the time to look at a problem, test the
answer and post it for someone, then I, for one, don't like to find
that I have wasted that time trying to help someone when I discover
that the question has been posted and answered elsewhere. It makes me
wonder how many people are doing the same thing to groups I don't
visit, and eats away at the goodwill and sense of community built up
within the groups.

It also makes one wonder why anyone should bother in the future when a
question is posted and answered in one group and then the same person
(or people) repost it in another - as you have done in the past - the
conclusion is that the answer originally given has not been read - if
it had been read and wasn't the correct answer, why not explain why?

If you are happy cross-posting and don't believe that it reduces the
quantity of detailed answers you get (some lists actually ban people
for persistant cross-posting) and don't believe or don't care about the
damage it may do, then of course you should carry on doing it. And
will, whatever I say.

Ian

Oct 31 '05 #6

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

Similar topics

3
3219
by: sky2070 | last post by:
session_start(); $_SESSION++; print 'You have visited here '.$_SESSION.' times.'; why the visit variable is not incremented the next time i enter. Notice: Undefined index: visits in C:\Program Files\Apache Group\Apache2\htdocs\session\cookie2.php on line 3 You have visited here 1 times.
2
1879
by: StinkFinger | last post by:
All, I have a function that returns data from my db as an array. To reduce the times the script has to access the db should I store the contents of the variable in a session variable and access it that way, or should I figure out how to set it and use it as a static variable ? I was thinking doing an isset on the session var, if exists, use it, if not, hit the db and store the
13
2303
by: Michael Satterwhite | last post by:
I'm trying to get a better feel for exactly how sessions work. At the beginning of a web page, I do either a session_start() or a session_register(...). When the user goes to the next page, I know the page needs to get the SSID. I know I can send it as a cookie, hidden field, etc, but what other ways are available to send it? For example, I know that session_registering variables at the top of the second page works. If the user visits...
11
2550
by: Colin Steadman | last post by:
Hope this makes sense! I'm building an ASP page which allows uses to add items to an invoice via a form, ie: Item No Part No Order No Quanity Units Price VAT ------- ------- -------- ------- ----- ----- --- .... ... ... ... ... ... ... <Add item> <Submit>
2
2524
by: Max | last post by:
This is the best method I've found to store and load settings from database. I load the settings once at start as public variables. The method can be called easily anytime you want to load the new settings from database. Comments very welcome... I'd like to refine this... besides the error handling I need to add for the db conn... Global.asax --------------- Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) Dim...
7
4408
by: Nils Hedström | last post by:
I have a web farm that uses a state server for session management. A user logs on to a website (www1.mysite.com). When the same user visits www2.mysite.com I want the user to be logged in. Right now it he is not logged in on www2.mysite.com (both sites use the same state server). The reason for this seems to be that the user gets a new SessionId when he visits a new web server (www2.mysite.com for example). If there was a way to add a...
6
4991
by: =?Utf-8?B?R2Vv?= | last post by:
Hi, I use lots of sessions. I want to clear the unwanted sessions when I leave a page. I cant use ViewState as it will slow down the pages. Could some one help me on this?
16
1852
by: Jonathan Wood | last post by:
Greetings, I was wondering if anyone here has a good understaning of the Session object. I know there are options like the Session.Abandon method and the regenerateExpiredSessionId setting, although I do not understand what they do. Can anyone tell me if it's possible for a recycled session to still contain the old data? I had a couple of reports that where users said they logged on and saw another user's data. On this site, there...
0
9605
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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
10135
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
6890
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
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
4339
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
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.