Hi all,
I 'm stuck. The below code reads and displays the contents of my database.
<cfquery name="GetFontFamily" datasource="fontstyles">
SELECT sti, ID
FROM fontsti
ORDER BY sti
</cfquery>
<cfoutput query="GetFontFamily">
<input type="hidden" name="ID" value="#GetFontFamily.ID#">
[#GetFontFamily.ID#] #GetFontFamily.sti#<br>
</cfoutput>
This displays something like...
[1] aachen.sti
[2] accolade.sti
[3] adelon.sti
[4] amelia.sti
[5] american-unciale.sti
[6] angelo.sti
[7] avantgarde.sti
[8] ballantines.sti
[9] bamberg.sti
[10] baskerville.sti
[11] bauhaus.sti
[12] belfast.sti
[13] bernstein.sti
[14] birch.sti
[15] Blackoak.sti
[16] boascript.sti
[17] bodoni.sti
[18] bookman.sti
[19] borderpi-15159.sti
[20] boutique.sti
I have an external file that I'm reading in that I want to compare against
the above list and display the appropriate ID numbers. Below is the
contents of my ASCII file and the code.
file.txt
--------
amelia
angelo
ballantines
baskerville
belfast
<cfoutput>
<!--- READ .STM FILE AND DISPLAY CONTENTS --->
<cffile action="READ"
file="#DosPath#\#FileNameOnly#"
variable="ReadMe">
<cfset listDelim = Chr(13) & Chr(10)>
<cfloop list="#ReadMe#" index="i"
delimiters="#listDelim#">
<input type="checkbox" name="select"
value="#Trim(i)#.sti">[#GetFontFamily.ID#] #Trim(i)#.sti<br>
<input type="hidden" name="select"
value="#Trim(i)#.sti">
</cfloop>
This is what gets displayed:
[1] amelia
[1] angelo
[1] ballantines
[1] baskerville
[1] belfast
How can I display the following?
[4] amelia.sti
[6] angelo.sti
[8] ballantines.sti
[10] baskerville.sti
[12] belfast.sti
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org