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

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 1720
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*******@poczta.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*******@poczta.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*********@yahoo.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.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
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...
0
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...
1
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...
4
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...
2
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...
14
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,...
0
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...
1
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...
4
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.