passing variables between pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
drors30
Forum Newbie
Posts: 10
Joined: Sat Jan 12, 2008 1:59 pm

passing variables between pages

Post by drors30 »

Hi ,
I have a page in which i have some values that i want to pass to another page.
(It's not a form , it's a page that contains calculations of total prices or total scores) .
The second page is like a template with fields to which I want to transfer the values.

So it's look like : “Your total score is” [here is the place for the passed value]
"The total prize is “ [ “ “ ]
I want to achieve this by pressing a button from the first page. How ?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Re: passing variables between pages

Post by JayBird »

Have a look at sessions

http://uk.php.net/session
User avatar
jimthunderbird
Forum Contributor
Posts: 147
Joined: Tue Jul 04, 2006 3:59 am
Location: San Francisco, CA

Re: passing variables between pages

Post by jimthunderbird »

There are fundamentally 4 ways to pass info between pages:

1. cookies
2. session
3. requrest variables
4. post variables

if you want the 4th way and don't want to create a form and if the client's browser most likely support AJAX, then use a AJAX post instead of traditional form post.
Post Reply