Categories > TinyButStrong general >

Conditional display dose not work when register an session

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: kuncon
Date: 2004-09-16
Time: 13:33

Conditional display dose not work when register an session

My html file is here:

<code>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>[tbs_check.set1;block=tr;if [var.light]=1]<br>
      This row is displayed if the variable $light is set to 1.</td>
  </tr>
  <tr>
    <td>[tbs_check.set1;block=tr;else]<br>
      This row is displayed in the other cases.</td>
  </tr>
</table>
</code>

At first it's worked very well. After i register a session like this:
<code>
$my_session = "something else"
session_register("my_session")
$light = 1;
.......
TBS->show();
</code>

it just works when $lght=1,. when $light=2 the second <tr> do not display. Please tell me how to do?....
Thanks
By: Skrol29
Date: 2004-09-17
Time: 11:31

Re: Conditional display dose not work when register an session

Hi,

I cannot reproduce your bug.
Do you have more info?
It worked ok for me with the following code:
$my_session = "something else";
session_register("my_session");
$light = 2;

include_once('tbs_class.php');

$TBS = new clsTinyButStrong;
$TBS->LoadTemplate('test.htm');
$TBS->Show();