473,396 Members | 1,693 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,396 software developers and data experts.

tracking a session without using sessions or cookies

Guys,

I have a couple of issues which I am hoping you can provide guidance
on...

First one:- Is there any way to retain the $_POST values when a user
navigates between pages without using <form method = 'post'>

I want to be able to track the user from one page to another to provide
customised content. I could make all navigation buttons as forms but
its a bit of a pain in the proverbials

Second one, which is related to the first:-

I have submitted and validated data in a form where the action is
$PHP_SELF.

I need to insert a record into a database.

The user will have selected a venue which may have more than one event.
The validation checks the database for the number of events and if
there is only one, chooses that as the default. If there is more than
one then it needs to display another form to select the correct event
but I obviously need to pass all the $_POST values through this new
form so that I can insert it into the database... Should I just
iterate through the $_POST array with hidden fields on the form, or can
I pass the whole array through while adding array elements to it?

Jun 25 '06 #1
5 1994
frothpoker wrote:
Guys,

I have a couple of issues which I am hoping you can provide guidance
on...

First one:- Is there any way to retain the $_POST values when a user
navigates between pages without using <form method = 'post'>

I want to be able to track the user from one page to another to provide
customised content. I could make all navigation buttons as forms but
its a bit of a pain in the proverbials Use a SESSION to store the values you want to remember.
Second one, which is related to the first:-

I have submitted and validated data in a form where the action is
$PHP_SELF.

I need to insert a record into a database.

The user will have selected a venue which may have more than one event.
The validation checks the database for the number of events and if
there is only one, chooses that as the default. If there is more than
one then it needs to display another form to select the correct event
but I obviously need to pass all the $_POST values through this new
form so that I can insert it into the database... Should I just
iterate through the $_POST array with hidden fields on the form, or can
I pass the whole array through while adding array elements to it?


Again SESSION would be your friend here.

Think of it this way. The browser may pass data to the php program using
either POST or GET methods. PHP programs may pass data using the SESSION
to other PHP programs.

The 'short cut' of using PHP_SELF and the browser-passed variables is
just that - a short cut.

-david-

Jun 25 '06 #2
<comp.lang.php>
<frothpoker>
<25 Jun 2006 07:45:21 -0700>
<11**********************@i40g2000cwc.googlegroups .com>
I have a couple of issues which I am hoping you can provide guidance
on...


Dont know about guidance - but couldnt you use the users ip address
coverted from 123.123.123.123 to 123_123_123_123.txt and append the text
to a flatfile assuming you have some sort of track.php include file at
the top of each page .

With perhaps 123_123_123_123_nav.txt being used when wanted etc .
--
www.emailuser.co.uk/?name=KRUSTOV
Jun 25 '06 #3
frothpoker wrote:
<snip>
First one:- Is there any way to retain the $_POST values when a user
navigates between pages without using <form method = 'post'>

I want to be able to track the user from one page to another to provide
customised content. I could make all navigation buttons as forms but
its a bit of a pain in the proverbials

<snip>

There are couple of hacks I'm thinking like hooking onClick via
JavaScript using event:Selectors/Prototype. But, I guess there might be
better elegant solution when you tell us what exactly is your problem.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jun 25 '06 #4
New response since I missed the desire not to use sessions or cookies.

Generate a unique id for the session and use that as the primary key
into a database where you store the variable values. Include the unique
id in each browser page and pass it back with each form.

-david-

Jun 25 '06 #5
Krustov wrote:
<comp.lang.php>
<frothpoker>
<25 Jun 2006 07:45:21 -0700>
<11**********************@i40g2000cwc.googlegroups .com>
I have a couple of issues which I am hoping you can provide guidance
on...


Dont know about guidance - but couldnt you use the users ip address
coverted from 123.123.123.123 to 123_123_123_123.txt and append the
text to a flatfile assuming you have some sort of track.php include
file at the top of each page .

With perhaps 123_123_123_123_nav.txt being used when wanted etc .


But the user's ip address may not be unique.
Jun 25 '06 #6

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

Similar topics

1
by: Paul | last post by:
Hmmm, didn't seem to work. I have set session.use_cookies = 1 and session.use_trans_sid = 1 in my php.ini file. Index.php contains:...
2
by: Brad | last post by:
Hi everyone, I've been using ASP on a few different projects over the past year, either using Javascript or VBScript. During that time, I've made use of session variables, but even then, I've...
14
by: Darrin J Olson | last post by:
I am trying to end a session for a site without having to completely close the browser to end it. When I access the site and log in it works fine. If I log out and in with a different account...
2
by: Amit D.Shinde | last post by:
Hello Experts.. I need some help regarding cookies and session objects and also global.asa file I am creating one cookie when a user logs in on my website. The cookie stores the login name of...
9
by: Jimmy Junatas | last post by:
When we open a window (using client-side jscript ie. window.open("/Site/Popup.aspx?...",...)) from Page1.aspx, the called page Popup.aspx does not have access to the Session variables present in...
2
by: Dinkster | last post by:
BackGround: - We are new to ASP - We thought we would experiment with using the session object (in proc) to store a small amount of data. - We get different results when cookieless is set to...
2
by: Wayne Wengert | last post by:
Are Session variables the same as a cookie? In reading a couple of pages I got from searches, I don't get the difference. Basically, I am currently using simple session variables (e.g....
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
11
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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,...
0
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...
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,...

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.