473,761 Members | 8,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

frames, session variables, and refresh

hey all,
my index.html file has 2 frames. one of the frames (left.php) sets a
php session variable (using a form). this works as expected. however,
when the user hits refresh on index.html, that session variable is
lost, even though the session id itself remains the exact same. is
this the expected behavior? if possible, how can i ensure the session
variable persists across the page refresh? thanks!
-henry

Sep 20 '05 #1
2 6745

lost hope wrote:
hey all,
my index.html file has 2 frames. one of the frames (left.php) sets a
php session variable (using a form). this works as expected. however,
when the user hits refresh on index.html, that session variable is
lost, even though the session id itself remains the exact same. is
this the expected behavior? if possible, how can i ensure the session
variable persists across the page refresh? thanks!
-henry


Hi,

It may be that your PHP session id needs to be passed from the left
hand frame to the main frame and maybe the frameset itself.

I had a similar thing happen on my college project a year or so ago but
my memory is a bit hazy so please forgive me if I'm wrong on this.

Kind regards,

Jimmy.

Sep 23 '05 #2
Create the session variable in index page first(not in framed page)
cause that will not affect ur framed page and help to persist the
session_id. Then pass it to your frame page using session_id()
function.

for example, your frame page url will be

<frame src=your_page_u rl?PHPSESSID=<? =session_id();? >

This will solve your problem.

NB: It may not be PHPSESSID in some cases, depending upon ur php.ini
setting.

--Hasin
http://hasin.phpxperts.com

Sep 23 '05 #3

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

Similar topics

1
2264
by: Dave Smithz | last post by:
Hi there, I have implemented a login sequence using session variables for a PHP/MySQL DB which I took over development. I read some books and this NG and it seemed straight forward. However the website I have taken over uses two frames. The left hand side is always a navigation frame with the righthand side of the screen always being the target. I developed a main web page where login takes place and if successful a session variable...
1
2796
by: Bart Plessers \(artabel\) | last post by:
Hello, Currently developping a site, where I use some session variables. The site is located at my home computer. Because I have a dynamic IP adress, I use no-ip (www.no-ip.org) to have my own custom domain name (pvo.no-ip.org) My ISP blocks port 80, so website runs at port 4040 The service no-ip offers "Mask / Cloaking Options": every request to my domain is "wrapped in a frame", so end user can only see one URL in browser.
6
3470
by: Colin Steadman | last post by:
I have created a function to kill all session variables that aren't in a safe list. This is the function - Sub PurgeSessionVariables For Each Item In Session.Contents Select Case Trim(Item) Case "Authenticated" Case "CI_CODE" Case "organisation_description" Case "location_description"
4
4668
by: A Web Master | last post by:
I am designing a site for a client where I have a frameset and 3 frames (all in ASP). I am creating session variables in the frameset that need to be accessed in the frames. It seams that in Netscape (4.75), the Frameset Session variables are not defined when accessed in the frames. Why and how to fix this ? Take these for example. The only session variable contents displayed right are the ones defined in the actual frame. This only...
4
1994
by: A Web Master | last post by:
I want to know the best way of passing on variable contents on a site coded in ASP using frameset/frame. Content is used in all frames for stuffs like screen_resolution, language, ... My client's site is visited by Netscape 4.x/6.x and IE-5.x/6.x. It's being converted to ASP and currently using frames (middle frame has a vert scroll bar). -I tried using Session("xxx") but in Netscape (4.x), it opens up a new Session-ID for each...
2
2129
by: Bonj | last post by:
H I've got the following problem - I need to have an aspx page with two frames, although the question isn't necessarily about the workings of the frames, more session variables... the frames consist of one header (not resizable) and one main (resizable). The source for the "main" page needs to be of the form "WebForm3.aspx?...." with parameters to be determined at runtime. I'm ok with this, I've gone down the route of puttin src="<%=...
3
2468
by: qwerty | last post by:
I´m new to ASP.Net. My workmate has some experience with it. He claimed that in ASP.Net working with frames is much simpler than it was ASP. I asked explanation but he couldn't give me such. (a button inside a-tag with attribute target isn't anything new relating ASP.Net, its same old HTML). He claimed that you could change another page´s controls´s property´s value from another frame by using this method: ' Page "Bottom"
6
2510
by: Doug | last post by:
I'm about to go nuts. I've got a VB.NET web app , utilizing frames(my 1st mistake). One of the frames is hidden and does a behind the scenes refresh, to keep the session alive. This works great with IIS 5.0, but when I port it to IIS 6.0. The refresh does not reset the session. The only thing that will work on the IIS 6.0 server, is to refresh the ENTIRE frameset. This is not an option. Is there anything I can do to the code, or...
3
3808
by: Ned Balzer | last post by:
Hi all, I posted this question some time ago in an earlier thread but so far I still don't have an understanding of why this is happening or what I can do to fix it. I use Session variables, such as Session("username") to store a lot of information about who is logged in to my app and what they can do. Since the app permits certain users to impersonate other users (permits some users to delegate their work to assistants, who are...
0
9554
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...
0
10136
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
9988
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
9923
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
8813
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
7358
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
6640
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
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
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.