Hi guyz,
I am developing a website using php.This website involves
dealing with forms which span over multiple pages.
I want data obtained from 1 form to be available after 3-4 pages.
This can be ofcourse achieved through use of cookies.But i am keeping
cookies as last option as they r not supposed to be reliable.I want to
achieve the above task using SESSION VARIABLES.Can someone please guide
me how to use session variables?(and pass form data across several
pages using them?)
Thanking in advance,
bye,
ben 3 3471
ben wrote: Hi guyz, I am developing a website using php.This website involves dealing with forms which span over multiple pages.
I want data obtained from 1 form to be available after 3-4 pages.
This can be ofcourse achieved through use of cookies.But i am keeping cookies as last option as they r not supposed to be reliable.I want to achieve the above task using SESSION VARIABLES.Can someone please guide me how to use session variables?(and pass form data across several pages using them?)
Thanking in advance, bye, ben
Hi,
Try php.net for starters: http://nl3.php.net/manual/en/ref.session.php
Generally speaking:
1) Make sure session work on your machine.
(eg: where are session stored? CHeck also php.ini for session.autosta rt to
make your life easier. If you have no write-access to php.ini, use
session_start() above every page)
2) on page1.php: put something in a session
eg
$_SESSION["firstname"] = $_POST["firstname"];
3) On page23.php, retrieve it:
echo $_SESSION["firstname"];
Good luck and be sure you read the manual at php.net. It is good and
explains a lot more than I possibly could over here.
Regards,
Erwin Moller
That's what hidden fields are for. Session variables aren't very good
solution here, as the user would get strange behavior if multiple
windows are opened, or if the back button is used.
Chung Leong wrote: That's what hidden fields are for. Session variables aren't very good solution here, as the user would get strange behavior if multiple windows are opened, or if the back button is used.
THAT depends on the quality of the underlying code Chung. :-)
But of course: Passing them all through hiddwen fields is another
possibility. I use it quite often actually. :-)
Regards,
Erwin Moller This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Kevin Lyons |
last post by:
Hello,
I am trying to get my select options (courses) passed correctly from
the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html
I am having difficulty getting the courses to pass the correct option
value and then be displayed at the following URL:
http://www.dslextreme.com/users/kevinlyons/selectResults.html
I am passing countries, products, and courses. The first two display
|
by: Matt M |
last post by:
Ok. So I'm passing values between web pages, as per microsoft's framework
development guide
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/ht
ml/cpconPassingServerControlValuesBetweenPages.asp)
So, I have two pages, one that has some public properties and fires a
Server.Transfer("receivepage.aspx");
The receivepage.aspx can then get some of the public properties I've set on
the first page.
|
by: Glenn |
last post by:
I am an old ASP developer that has begun porting existing apps to ASP.NET.
I am currently working on a wizard dialog that contains about 4 pages. In
ASP in order to keep track of user entered data on the various wizard pages
I had to manually create hidden form fields and pass these between pages.
The form action either went to the next or previous page in the dialog,
depending on whether NEXT or BACK button was pressed. All validation...
|
by: Stephen Bartholomew |
last post by:
Hi All,
Firstly, apologies to anyone that notices the cross-post: i also
posted this in microsoft.public.dotnet.general earlier this week.
I have an ecommerce site that resides mainly on an unsecure server for
browsing the catalogue and only passes the user to a secure area when
its time checkout. The secure domain however is not located on the
same URL as the unsecure site - it is hosted on a virtual directory of
the ISP's secure...
|
by: Eric |
last post by:
Hello,
I am trying to come up with the best way to pass large amounts of data from
page to page, namely a data table.
The user needs to enter data into a form in one page and confirm it on
another. Session variables seem like the easiest, but I'm afraid of
crashing the server after deploying with a few hundred users as opposed to
just a few developers/testers. Any ideas?
| |
by: Steven J. Reed |
last post by:
I must be missing something, because this should be easy to do.
After the user has selected several options on a page, I do a database query
which returns a few records that I want to pass to another page via XML. How
do I do this?
I typically Response.Redirect around my app, including various parameters.
Do I just include the XML as a parameter as in:
Response.Redirect("page.aspx?" & ds.WriteXML)
|
by: Smokey Grindle |
last post by:
For a website that has users logged into it using sessions, its it best to
pass data between pages in session variables or through query strings?
|
by: nathj |
last post by:
Hi,
Part of one of my current projects is to provide an application form. This form needs to get quite a bit of data, so rather than have one really long form on one page I have split the data over 3 pages. Each page validates the input as you go so that the final page can submit it all to the database knowing that it is valid.
What I don't know how to do is pass the data through the three pages. Each page needs to pass it's data onto the...
|
by: BezerkRogue |
last post by:
I have created a page that passes a variables from the start page to a results page that allows operators to edit the data. When I click the submit button, it reruns the page load instruction from the edit page and crashes instead of passing the variables to the final page. Here is the cmdSubmit code.
Protected Sub cmdSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSubmit.Click
Dim strShift = lblShift...
|
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...
|
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,...
| |
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: 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...
|
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: 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();...
|
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.
| |