Forums

This topic is locked

Semi-dynamic text!? :-)

Posted 15 Aug 2002 09:04:46
1
has voted
15 Aug 2002 09:04:46 Kutt Niinepuu posted:
Alright, gurus! The case is a follows: I have a Y/N field in the databse but I want to display the values as "Confirmed" when the value is "Y" and "Unconfirmed" when it is "N". How to tell DW MX that?

Thanks in advance, I have faith in you! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Less is more1

Replies

Replied 15 Aug 2002 10:26:11
15 Aug 2002 10:26:11 Viktor Farcic replied:
<pre id=code><font face=courier size=2 id=code>&lt;%
If (RecordsetName.Fields.Item("FieldName".Value) Then
Response.Write("Confirmed"
Else
Response.Write("Uncomfirmed"
End If
%&gt;</font id=code></pre id=code>

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Alright, gurus! The case is a follows: I have a Y/N field in the databse but I want to display the values as "Confirmed" when the value is "Y" and "Unconfirmed" when it is "N". How to tell DW MX that?

Thanks in advance, I have faith in you! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Less is more1
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic
www.farcic.com
TalkZone Manager
Replied 15 Aug 2002 10:41:27
15 Aug 2002 10:41:27 Kutt Niinepuu replied:
Hmm, could someone translate it into PHP please? Writing PHP code is not one of my strongest sides...

Less is more1
Replied 15 Aug 2002 13:26:19
15 Aug 2002 13:26:19 Kutt Niinepuu replied:
Aah, I figured it out myself (using the checkbox example MX provides), here's the code for others:

<pre id=code><font face=courier size=2 id=code>&lt;?php if (!(strcmp($row_RecordsetName['FiledName'],"Y")) {echo "Confirmed";} else {echo "Unconfirmed";}?&gt;</font id=code></pre id=code>

Insert it anywhere on your page. Viola!

Thanks anyway to those who answered!


Less is more1

Reply to this topic