Jump to content


This topic is now archived and is closed to further replies.


survey help

Recommended Posts

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]

Share this post

Link to post
Share on other sites
You want to use sessions.

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


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.