I am using the phpsurveyor script and am trying to display the results of the survey before the person submits it. The page would allow the person to review their entries.
I know it can be done because it is displayed in the confirmation email sent to the administrator when someone submits a survey.
Here is the code that displays the results of the survey in the email
Code: Select all
if ($sendnotification > 1)
{ //Send results as well. Currently just bare-bones - will be extended in later release
$message .= "----------------------------\r\n";
foreach ($_SESSION['insertarray'] as $value)
{
$questiontitle=returnquestiontitlefromfieldcode($value);
$message .= "$questiontitle: ";
if (isset($_SESSION[$value]))
{
$message .= getextendedanswer($value, $_SESSION[$value]);
}
$message .= "\r\n";
}
$message .= "----------------------------\r\n\r\n";
}If you need to see the rest of the code I can add it
How do I add the results of the survey into a regular .php page?
Thanks I am an html person and am do not use php often.