/    Sign up×
Community /Pin to ProfileBookmark

newbie please help SOS

Guys I created 6 forms.
Form 1 holds a field named total value which equals to the tot from all the pages aka total value=form2.tot+form3.tot+form4.tot etc.
In all other forms 2-6 there is a filed call tot that holds a number representing the total for the specific page.
In each of the pages there are 2 buttons, submit button and continue button.
Clicking on the submit button should take the user back to from 1 transferring the value to the field total value and adding it to whatever is in there.
Clicking on continue should take the user to the next form transferring the tot value to the total value field on form 1 adding it to what ever was in there

I understand the logic behind it but as I am a new comer to programming I have no idea how to do that.

if you would like to see what is it all about please log to [url]www.stevensmovers.com/quote.html[/url] and clink the inventory button

Any idea ?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@gaston9x19May 13.2005 — Learn how to use forms to transfer data. I recommend looking on Amazon for a beginner's PHP book, or searching online for PHP forms tutorials.

Just as a note of interest, you could use CGI and Perl or simlilar language to do what you want to do, but PHP is the easiest to learn and use.
Copy linkTweet thisAlerts:
@Stephen_PhilbinMay 14.2005 — Just use [url=http://www.zend.com/manual/features.sessions.php]sessions[/url].
Copy linkTweet thisAlerts:
@raniauthorMay 14.2005 — Mr. Herer thanks for your reply but i know nothing about PHP could you elaborate a bit ?
Copy linkTweet thisAlerts:
@Stephen_PhilbinMay 14.2005 — Just have a look at the manual, it explains it all there. I'll give you a basic breakdown though anyway.

Basically a session as far as the user is concerned is a cookie with an id on it. To the php script and server running the file it has a store of info that relates to the id on the users cookie. That way your server can store simple info and your scripts and just dip into this store for the info you need to make your applications work.

So for your multitude of forms, you can have the user submit the form either by POST or GET and then store that info in a session. You could also store which form your user just came from too so that if they hit the back button, your script knows about it and can re-evaluate the maths accordingly.

An analogy to sessions is carrying items through a metal detector at an airport. You can't take certain items from one side of the detector to the other with you, instead you put them in a tray outside the detector and them pick them up again on the other side. Sessions work in exactly the same way. You pop the info on the server for a mo' whilst you change scripts, then when the next script loads you get the info you want back from the server.
Copy linkTweet thisAlerts:
@raniauthorMay 14.2005 — ok is there a place i can download an example of such a thing ?
×

Success!

Help @rani spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...