Eric Justus - 2017-08-08 17:19:30
Hello, I have two files: File1: choice.php and File2: summary.php. The members of my sportclub may choose material in file 1 and see the summary in file2.
The members may switch as many times as they want from file 1 to file 2. The purpose is to see an extra line in the summary after each choice.
In File1 I have this:
$_SESSION['summorder'][] = "my hardcoded text "$myvar;
and in File2 this:
echo implode("",$_SESSION['summorder']);
The results are not what I expect:
After choice1 the following lines are visible
Line 1 is empty (no data, only hardcoded text)
Line 2 correspond to the choice made.
After choice2:
Line 2 is doubled and line 3 (corresponding to choice 2) is visible.
And so on after every choice, previous line doubled, latest choice correct.
Any idea what is going wrong? Thank you for your help.