How to get php $_SESSION variable inside a template
Try following:

    // php code;
        $_SESSION['test'] = 'Hello World';

    // assign 'Hello World' to .tpl
        $this-&gt;assign('test', $_SESSION['test']);

    // use '{$test}' following in .tpl file to display on Thank you page, For e.g
       &lt;tr&gt;
         &lt;td&gt;{$test}&lt;/td&gt; // this will print 'Hello World' on page
       &lt;/tr&gt;