Jump to content


Photo

survey help


  • Please log in to reply
1 reply to this topic

#1 skeezmo

skeezmo
  • Members
  • Pip
  • Newbie
  • 7 posts
  • LocationPhoenix!

Posted 23 April 2006 - 10:07 PM

I have an equality survey with multiple stages. These stages seem to be in the way of the data selected being put to variables. I have tried to implement as best I can the way to save the data to a variable with only one page of options, but this has truly stumped me.

Does anyone here know how exactly I would go about doing this?

Hess


PS :

The code is extremely long, so I have put it on this separate page as not to clutter up the forum. [a href=\"http://68.230.58.109:916/aero/source.txt\" target=\"_blank\"]Source Code[/a]

You can also view the page if you wish here : [a href=\"http://68.230.58.109:916/aero/survey.php\" target=\"_blank\"]http://68.230.58.109:916/aero/survey.php[/a]
Skeezmo



The truth about Windows Programming: Windoze M.E. More Errors

#2 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 24 April 2006 - 02:54 PM

You want to use sessions.

At the start of each script, put the code
<?php session_start(); ?>
Whenever you want to store a variable, use
<?php $_SESSION['some_var'] = $some_var; ?>
When you want to use a value stored in the session array, you can either assign it to a variable
<?php $some_var = $_SESSION['some_var'] ?>
or use it directly, as in
<?php echo $_SESSION['var']; ?>

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users