OT Smarty problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Apologies for posting this here but coudn't find a decent Smarty list.

I've been using Smarty for 4 years without much problem. I'm adding some
extra functionality to a page used by 2 members of staff. My snippets of
relevant code are:

$smarty->assign('clearance',      $clearbits['clearance_alt']);

<td align="right" class="s9">Clearance&nbsp;{$clearance}</td>
<td class="s9">&nbsp;</td>
<td bgcolor="aliceblue"><select class="formInputText" id="clearance_alt"
name="clearance_alt">
      <option value=0{if $clearance==0} selected{/if}>Select</option>
      <option value=1{if $clearance==1} selected{/if}>Yes</option>
      <option value=2{if $clearance==2} selected{/if}>No</option>
      <option value=3{if $clearance==3} selected{/if}>Failed</option>
</select></td>

You will see that I have called the variable in the first column. On the web
page, this displays as "Clearance 1". I would then expect 'Yes' to appear
selected in the column three drop-down box. Unfortunately, this displays as
'Select'.

I have tried deleting all the cached template files as well as single and
double quotes around the 0,1,2,3 values, all to no avail.

All the other Smarty stuff seems to be working on the site.

Can anyone point me in the right direction?
Cheers

George in wet and windy Edinburgh


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux