Jump to content


survey help

  • Please log in to reply
1 reply to this topic

#1 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?


PS :

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

You can also view the page if you wish here : [a href=\"\" target=\"_blank\"][/a]

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

#2 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']; ?>


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users