473,698 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to display form variables?

Hi.

I have two forms each in different file user need to fill both one after
another.

Is it possible to display variables from both forms at the end?

does $_POST contains variables from both forms?

If not what is the way to display variables from previous form?

Thanks.
Leszek

Feb 14 '06 #1
8 1730
Hello

Am 14.02.2006 22:18 schrieb Leszek:
I have two forms each in different file user need to fill both one after
another.

Is it possible to display variables from both forms at the end?

does $_POST contains variables from both forms?


You have to put the variable from your first form into hidden-fields in
the second one.

Johannes
Feb 14 '06 #2
you could do it by moving the 1st POST variables into a SESSION variable.
then jsut adding the second forms post to the session untill all forms are
done. then just display everything stored in the session at the end. im not
sure if session variables can contain arrays but if they can you could store
each form in an array , that would make it easier.

"Leszek" <le*******@pocz ta.onet.pl> wrote in message
news:ds******** **@news.onet.pl ...
Hi.

I have two forms each in different file user need to fill both one after
another.

Is it possible to display variables from both forms at the end?

does $_POST contains variables from both forms?

If not what is the way to display variables from previous form?

Thanks.
Leszek

Feb 14 '06 #3
Hello,

Am 15.02.2006 00:20 schrieb Ninja_Monkey:
you could do it by moving the 1st POST variables into a SESSION variable.
then jsut adding the second forms post to the session untill all forms are
done. then just display everything stored in the session at the end.
Yes, that works, too, but you can have problems when validating the site
and users may see the session-id.
im not sure if session variables can contain arrays but if they can you could store each form in an array , that would make it easier.


Thats works! $_SESSION itself is an array.
Feb 14 '06 #4
session variables is the way to go.

http://us3.php.net/manual/en/function.session-start.php

also, google some tutorials. remember, you also need to unset your
sessions variables when you longer want them to have a value.

Feb 15 '06 #5
to answer yor question, $_POST holds the variable(s) from the prior
submitted page only. if a page is submitted again, or another link is
followed, that prior $_POST data is gone.

Feb 15 '06 #6
["Followup-To:" header set to alt.php.]
On 2006-02-14, Leszek <le*******@pocz ta.onet.pl> wrote:
Hi.

I have two forms each in different file user need to fill both one after
another.

Is it possible to display variables from both forms at the end?

does $_POST contains variables from both forms?

If not what is the way to display variables from previous form?


a: return them in a hidden fields of the second form
or
b: $_SESSION

Bye.
Jasen
Feb 15 '06 #7
Session variables can be arrays just like any other php variable, there
is no problem with the Session array being multi-dimensional, as long
as you are happy to write the logic to extract what you want from it :)

Feb 15 '06 #8

"Skeets" <sk*********@ya hoo.com> wrote in message
news:11******** *************@g 44g2000cwa.goog legroups.com...
to answer yor question, $_POST holds the variable(s) from the prior
submitted page only. if a page is submitted again, or another link is
followed, that prior $_POST data is gone.


I think IE forces you to repost the data almost if you do a refresh. the
only thing that it doesn't completely work in is a file upload.
Feb 16 '06 #9

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

Similar topics

4
1797
by: dmiller23462 | last post by:
Somebody take a look and give me any suggestions? My brain is nuked... Here's my deal....I have online submission forms on my intranet at work here....I am appending to an Access DB with the input from all HTML fields and then querying aforementioned DB with different variables (search by name, wave, reason, etc). The output that I'm getting (SELECT * 'cause I need all of the data included in the search) I would like to display in a nice...
0
1320
by: Tony | last post by:
vs 2002 - vb - access 2002 - xp - web forms I want to display records, one at a time. I have about 25 fields to display. I've created SQL and retrieved records. I placed data in 25 separate dropdown list. (made them invisible on form) each time they pick next I add 1 and do something like this for each field CurrentRecord += 1 (test for upper bounds and less then 0) ddName.selectedindex = CurrentRecord
1
1408
by: paavani krama via .NET 247 | last post by:
(Type your message here) I am using two forms.From the first form i need to getinformatiom.After performing necessary calculations,the resultshould be displayed in the 2nd form.i am storing the results inpublic variables in 1st form.I want the 2nd form to access thepublic variables in the 1st form and display the same in thesecond form.How can i do it? -------------------------------- From: paavani krama ----------------------- Posted by...
4
5613
by: drew197 | last post by:
I am a newbie. I am editing someone elses code to make it compatible with Firefox and Safari. In IE, when you click on the proper link, a block of text is shown in a nice paragraph form. But, in FireFox and Safari it appears as a narrow column of text with only 2-3 words per line. Here is the code: function showAll()
2
3942
by: Joe-Paul | last post by:
Randy: Hope you get this. I am the one that wrote regarding trying to get my boss' computer screen to fit my program (rather than the other way around). Thanks for the hint. I went to the link provided for enumeration of the display. I tried the program in VB6.0 and it worked (while I had it as a stand alone). I modified it so that the Public Declare statements and variables were in a Bas Module. Then I put the procedure to find...
14
23155
by: lmttag | last post by:
Hello. We're developing an ASP.NET 2.0 (C#) application and we're trying to AJAX-enable it. We're having problem with a page not showing the page while a long-running process is executing. So, we're looking for a way to display the page with a "please wait..." message while the process is running, and then, when the process is done, update the page with the actual results/page content. We have a page that opens another browser/page...
0
1228
by: adilzcool | last post by:
Hi All , I am New to this Form i am working on project to consume Java Webservice from PHP (front end). So i need to display an image sent from JWS (WSDL) mode in PHP. I have used diff methods in JWS to send the image viz as BLOB type or byte type. But unable to display it in PHP. It need to be decoded back to display which i am unable to do. Does PHP's current version has this capabilty or not??. Here is my code snippet of the soap...
1
3951
by: William Gill | last post by:
I hope I can state this clearly enough. I am redoing some of my html(php) forms. I'm trying to break things into three functions on a self processing php page: 1) show the form (and populate fields if there were errors) 2) validate form data 3) process form data 2 and 3 are no problem, but 1 is. The page with the form displayed should validate as html 4.01 strict (actually all iterations of the page
4
1286
by: =?Utf-8?B?QmVu?= | last post by:
Hi all, I am trying to write a test console app in vb2008 express. Below is the code: Module Module1 Sub Main() Dim frm As New Form1 MsgBox("a test message") 'frm.Visible = True
0
8685
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
9171
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...
1
8905
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
7743
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
6532
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
5869
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
4373
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
3053
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
2342
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.