<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brad Melendy</title>
	<atom:link href="http://brad.melendy.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://brad.melendy.com</link>
	<description>My Technical Thoughts and Opinions</description>
	<lastBuildDate>Wed, 18 Aug 2010 23:55:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Coldfusion Hotfix for Directory Traversal Exploit</title>
		<link>http://brad.melendy.com/?p=218</link>
		<comments>http://brad.melendy.com/?p=218#comments</comments>
		<pubDate>Wed, 18 Aug 2010 23:55:38 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=218</guid>
		<description><![CDATA[This month Richard Brain of ProCheckUp Ltd reported a directory traversal exploit to Adobe. Details can be found here on the ProCheckUp website. Adobe has released a hotfix for versions 8.0, 8.01, 9.0 and 9.01. No word if there will be a patch for 7.x or older. I suspect there will not be since those [...]]]></description>
			<content:encoded><![CDATA[<p>This month Richard Brain of ProCheckUp Ltd reported a directory traversal exploit to Adobe.  Details can be found <a href="http://www.procheckup.com/news_manager/news/80_million_websites__1281481200" target="_blank">here </a>on the ProCheckUp website.  Adobe has released a <a href="http://kb2.adobe.com/cps/857/cpsid_85766.html" target="_blank">hotfix </a>for versions 8.0, 8.01, 9.0 and 9.01.  No word if there will be a patch for 7.x or older.  I suspect there will not be since those versions have gone beyond <em>End of Life</em>.  This means you should surely patch your servers (I&#8217;m doing mine this week) and if you have an older server that is 7.x or older, try to get that thing upgraded.  </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D218';
  addthis_title  = 'Coldfusion+Hotfix+for+Directory+Traversal+Exploit';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=218</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Java, No Problem with Google App Inventor</title>
		<link>http://brad.melendy.com/?p=213</link>
		<comments>http://brad.melendy.com/?p=213#comments</comments>
		<pubDate>Sun, 25 Jul 2010 16:58:21 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=213</guid>
		<description><![CDATA[Earlier this month, Google launched App Inventor, a tool that lets non-programmers develop basic Android applications for mobile devices. The obvious implication is that it also opens the door for all the programmers out there without a working knowledge of Java to produce simple Android apps as well. For a couple years I&#8217;ve been thinking [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this month, Google launched <a target="_blank" href="http://appinventor.googlelabs.com/about/">App Inventor</a>, a tool that lets non-programmers develop basic Android applications for mobile devices.  The obvious implication is that it also opens the door for all the programmers out there without a working knowledge of Java to produce simple Android apps as well.  </p>
<p>For a couple years I&#8217;ve been thinking it might be neat to try producing an app for an Android phone but didn&#8217;t have the time or inclination to tackle learning Java, the language used to develop Android applications.  Like lots of programmers out there, I&#8217;ve had some exposure in college but that was long forgotten and never used as I worked as a ColdFusion programmer the last eight years.  But this opens a door for me.  If I get hooked creating simple apps, I&#8217;ll likely put out the extra effort to get a working knowledge of Java and take it to the next level.  </p>
<p>I think this is exactly the sort of thing that could potentially bring lots of new developers into the Android market place.  Give them a taste of what they can do with a tool like App Inventor and some will surely take the next step to produce more complex apps.  Besides, you never know what a creative person might come up with.  Some of the biggest success stories to come out of the mobile app market have been extremely simple tools that were more about a creative idea than complex application development.  </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D213';
  addthis_title  = 'No+Java%2C+No+Problem+with+Google+App+Inventor';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=213</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Aptana Studio + CFEclipse = Dreamweaver CS4 Replacement</title>
		<link>http://brad.melendy.com/?p=208</link>
		<comments>http://brad.melendy.com/?p=208#comments</comments>
		<pubDate>Wed, 07 Jul 2010 23:13:51 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=208</guid>
		<description><![CDATA[I&#8217;ve been trying about once a year for the last 4 years to switch away from Dreamweaver to Eclipse with the CFEclipse plugin. Each time, I always ended up going back to Dreamweaver because the Eclipse/CFEclipse combination just wasn&#8217;t able to replace DW for me. Finally though, I am happy to say that I have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying about once a year for the last 4 years to switch away from Dreamweaver to Eclipse with the CFEclipse plugin.  Each time, I always ended up going back to Dreamweaver because the Eclipse/CFEclipse combination just wasn&#8217;t able to replace DW for me.  Finally though, I am happy to say that I have found the right free alternative to Dreamweaver in <a target="_blank" href="http://aptana.org/">Aptana </a>and <a target="_blank" href="http://www.cfeclipse.org/">CFClipse</a>.  </p>
<p>There were really only two things I needed to replace Dreamweaver, a CFML tag editor and the concept of a remote site like Dreamweaver has.  Eclipse always had spotty FTP support that I could never get working.  Not until Aptana 2.x did I find a version of Eclipse that had solid FTP support and the concept of a remote site that supported &#8220;upload on save&#8221;.  </p>
<p>I&#8217;ve been using the combination of Aptana Studio and CFEclipse for about three months now and I really don&#8217;t miss Dreamweaver at all.  Occasionally I wish I had a GUI display for editing like DW has, but that is very rare.  In the end I&#8217;m very happy with my switch after having used Dreamweaver in various forms from UltraDev to CS4 over the last 8 years.  If you are looking for a free option, Aptana and CFEclipse might be for you.  </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D208';
  addthis_title  = 'Aptana+Studio+%2B+CFEclipse+%3D+Dreamweaver+CS4+Replacement';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=208</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Coldfusion and Apache won&#8217;t default execute index.cfm?</title>
		<link>http://brad.melendy.com/?p=200</link>
		<comments>http://brad.melendy.com/?p=200#comments</comments>
		<pubDate>Wed, 23 Jun 2010 18:27:48 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=200</guid>
		<description><![CDATA[Ran into this today, strange setup but I&#8217;m running Coldfusion 9 with Apache (WAMP Server) 2.2.11. The short story is that I installed and configured CF just fine, but when it came time to execute CFML pages, nothing would happen unless I put the name of the file at the end of the URL? So [...]]]></description>
			<content:encoded><![CDATA[<p>Ran into this today, strange setup but I&#8217;m running Coldfusion 9 with Apache (WAMP Server) 2.2.11.  The short story is that I installed and configured CF just fine, but when it came time to execute CFML pages, nothing would happen unless I put the name of the file at the end of the URL?  So in the case of index.cfm, I had to actually type that on the end of the URL?  </p>
<p>Initially I figured I forgot to add index.cfm to the DirectoryIndex in httpd.conf.  I did that and restarted apache and still no execution of index.cfm??  After googling a bit and finding nothing, I examined the only other portion of apache I thought could be responsible.  The spot where JRun gets loaded as an Apache module.  Sure enough, the following line was at the bottom:</p>
<blockquote><p>AddHandler jrun-handler .jsp .jws </p></blockquote>
<p>It was obvious I needed to add .cfm to that list in order to have Apache pass any CFML page along to the module for execution by Coldfusion.  So I made the following change:</p>
<blockquote><p>AddHandler jrun-handler .jsp .jws .cfm</p></blockquote>
<p>After that, Apache happily referred index.cfm to JRun for processing.  Why the installer didn&#8217;t get that setup correctly in the first place I don&#8217;t know.  The Web Server Configuration Tool said everything was great when I set the server up.  Something to watch for and hopefully not waste too much time with next time.  </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D200';
  addthis_title  = 'Coldfusion+and+Apache+won%26%238217%3Bt+default+execute+index.cfm%3F';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=200</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion Enterprise server spontaneously reverting to Developer Edition!?</title>
		<link>http://brad.melendy.com/?p=198</link>
		<comments>http://brad.melendy.com/?p=198#comments</comments>
		<pubDate>Wed, 09 Jun 2010 19:07:20 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=198</guid>
		<description><![CDATA[I&#8217;ve had this happen on multiple occasions and it isn&#8217;t after 30 days either. Most recently, (about 30 minutes ago I might add) a production enterprise server that has been running as with an Enterprise License for two years, crashed and when it restarted, it was a developer edition. Ok, so now my public facing [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had this happen on multiple occasions and it isn&#8217;t after 30 days either.  Most recently, (about 30 minutes ago I might add) a production enterprise server that has been running as with an Enterprise License for two years, crashed and when it restarted, it was a developer edition.  </p>
<p>Ok, so now my public facing server has a limit of three concurrent IP addresses, not good.  I quickly grab my list of Enterprise serial numbers but uh oh, I can&#8217;t log in to the administrator because the rest of the world is trying to hit the server!  So I must restart CF and refresh my browser over and over until I beat the rest of the planet to acquire one of my three precious IP slots.  Lucky for me I get in, re-apply my serial numbers and I&#8217;m back in business.  </p>
<p>As to why this happens, I have no idea.  I googled and didn&#8217;t come up with much (or every time I used the phrase &#8220;reverts to developer edition&#8221; I got entries talking about what happens after a 30 day trial.  At any rate, it seems to happen to me about once every 1-2 years.  It always annoys but not enough to make me say things like, &#8220;I&#8217;m switching to .NET or J2EE&#8221;.  I suppose those servers have their own issues just as CF has, but the spontaneous reversion to developer edition is indeed a bad one because it renders your server useless.  </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D198';
  addthis_title  = 'ColdFusion+Enterprise+server+spontaneously+reverting+to+Developer+Edition%21%3F';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=198</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free ColdFusion Development Licenses with version 9</title>
		<link>http://brad.melendy.com/?p=194</link>
		<comments>http://brad.melendy.com/?p=194#comments</comments>
		<pubDate>Tue, 18 May 2010 18:38:26 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=194</guid>
		<description><![CDATA[We are finally upgrading to version 9 of Adobe Coldfusion and I was pleasantly pleased to find out thaasdft we no longer need to purchase additional enterprise licenses for our development and test servers. According to the new license agreement distributed with Coldfusion 9, if you buy a license you can apply the license for [...]]]></description>
			<content:encoded><![CDATA[<p>We are finally upgrading to version 9 of Adobe Coldfusion and I was pleasantly pleased to find out thaasdft we no longer need to purchase additional enterprise licenses for our development and test servers.  According to the new license agreement distributed with Coldfusion 9, if you buy a license you can apply the license for an internal development, test or staging instance server:</p>
<blockquote><p>3.1.3 If Licensee purchases one or more Production Software licenses, then Adobe also grants Licensee the right to install and use the Software as Development Software for internal development, testing and staging.</p></blockquote>
<p>This is great because in the past, we had practiced buying a full license for our development environment even though we only ever hit the server with a dozen or so developers.  Occasionally we would perform some load testing and fake lots of users with software, but still it was always on an enterprise server that resided behind the firewall (not accessible by the outside world).  </p>
<p>Adobe will surely lose a little money here, but hopefully it attracts more customers with this improved pricing which will make up the difference and then some, not to mention the added benefit of expanding the user base of ColdFusion.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D194';
  addthis_title  = 'Free+ColdFusion+Development+Licenses+with+version+9';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=194</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finally back up&#8230;</title>
		<link>http://brad.melendy.com/?p=193</link>
		<comments>http://brad.melendy.com/?p=193#comments</comments>
		<pubDate>Tue, 13 Apr 2010 04:17:01 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=193</guid>
		<description><![CDATA[Well, I switched hosts a while back and sorta stopped posting anything on my blog. I don&#8217;t have everything back running yet, but am going to get things fixed completely this week. addthis_url = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D193'; addthis_title = 'Finally+back+up%26%238230%3B'; addthis_pub = 'bmelendy';]]></description>
			<content:encoded><![CDATA[<p>Well, I switched hosts a while back and sorta stopped posting anything on my blog.  I don&#8217;t have everything back running yet, but am going to get things fixed completely this week.  <img src='http://brad.melendy.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D193';
  addthis_title  = 'Finally+back+up%26%238230%3B';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=193</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RIA Forge</title>
		<link>http://brad.melendy.com/?p=185</link>
		<comments>http://brad.melendy.com/?p=185#comments</comments>
		<pubDate>Thu, 14 May 2009 21:35:16 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=185</guid>
		<description><![CDATA[If you aren&#8217;t familiar with RIA Forge, it is the main site for all things that are open source and related to adobe products (like Coldfusion). I often forget about this site and all the really neat stuff there is there so I figured it was worth posting: http://www.riaforge.org/ addthis_url = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D185'; addthis_title = 'RIA+Forge'; [...]]]></description>
			<content:encoded><![CDATA[<p>If you aren&#8217;t familiar with RIA Forge, it is the main site for all things that are open source and related to adobe products (like Coldfusion).  I often forget about this site and all the really neat stuff there is there so I figured it was worth posting:</p>
<p><a href="http://www.riaforge.org/">http://www.riaforge.org/</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D185';
  addthis_title  = 'RIA+Forge';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=185</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parsing the FIELDNAMES Variable for Dynamic Form Processing</title>
		<link>http://brad.melendy.com/?p=175</link>
		<comments>http://brad.melendy.com/?p=175#comments</comments>
		<pubDate>Thu, 20 Nov 2008 23:41:22 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=175</guid>
		<description><![CDATA[So something I&#8217;ve done for a number of years now is to parse the FIELDNAMES variable from the FORM scope to process a form submission.  I thought I&#8217;d blog about it after a co-worker heard me talking about it and didn&#8217;t really know what it was. The FIELDNAMES variable is a built-in variable available in [...]]]></description>
			<content:encoded><![CDATA[<p>So something I&#8217;ve done for a number of years now is to parse the FIELDNAMES variable from the FORM scope to process a form submission.  I thought I&#8217;d blog about it after a co-worker heard me talking about it and didn&#8217;t really know what it was. The FIELDNAMES variable is a built-in variable available in Coldfusion on any form&#8217;s ACTION page.  It holds a comma delimited list of all the form fields that were submitted from the form.</p>
<p>Parsing the FIELDNAMES variable can be a good way to process form data dynamically.  It is especially useful for very long forms or forms that change frequently and keeps you from having to update your action page.  In the following example, we take a standard form and submit to an action page that inserts our form data into a database:</p>
<p>We need our database with a defined table, a form and an action template.  My sample table in MySQL looks like this:</p>
<blockquote><p>DROP TABLE IF EXISTS `bradtest`.`users`;<br />
CREATE TABLE  `bradtest`.`users` (<br />
`id` int(10) unsigned NOT NULL auto_increment,<br />
`fname` varchar(45) NOT NULL,<br />
`lname` varchar(45) NOT NULL,<br />
`email` varchar(45) NOT NULL,<br />
`password` varchar(45) NOT NULL,<br />
PRIMARY KEY  (`id`)<br />
) ENGINE=InnoDB DEFAULT CHARSET=latin1;</p></blockquote>
<p>Remember the column names, as we will use those for our form field names.  This is because for this to work right, <strong>you must use your database column names as your form field names</strong>.  So create yourself a form, or use mine below.  It doesn&#8217;t matter how many form fields you have as long as you have a matching column in your table:</p>
<blockquote><p>&lt;cfform action=&#8221;form_process.cfm&#8221; method=&#8221;post&#8221;&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;First Name:&lt;/td&gt;&lt;td&gt;&lt;cfinput type=&#8221;text&#8221; name=&#8221;fname&#8221; &gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Last Name:&lt;/td&gt;&lt;td&gt;&lt;cfinput type=&#8221;text&#8221; name=&#8221;lname&#8221; &gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Email:&lt;/td&gt;&lt;td&gt;&lt;cfinput type=&#8221;text&#8221; name=&#8221;email&#8221; &gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;Password:&lt;/td&gt;&lt;td&gt;&lt;cfinput type=&#8221;password&#8221; name=&#8221;password&#8221; &gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td colspan=&#8221;2&#8243;&gt;&lt;input type=&#8221;submit&#8221; value=&#8221;Submit&#8221;&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/cfform&gt;</p></blockquote>
<p>For the last step, just need only parse our results on the action page.  The first step is only needed if you are going to insert into a database.  I&#8217;m going to calculate the number of commas I need seperate items in my SQL statement:</p>
<p>&lt;cfset commas = #ListLen(form.fieldnames)#&gt;</p>
<p>We actually need one less comma than this value, and it doesn&#8217;t come into play until later.  Next I&#8217;m going to duplicate some code just for the purpose of displaying our results.  We will use this CFLOOP routine again in our CFQUERY tag:</p>
<blockquote><p>&lt;cfloop from=&#8221;1&#8243; to=&#8221;#ListLen(form.fieldnames)#&#8221; index=&#8221;fieldCount&#8221;&gt;<br />
&lt;cfoutput&gt;<br />
#ListGetAt(form.fieldnames,fieldCount,&#8221;,&#8221;)# =<br />
#Evaluate(ListGetAt(form.fieldnames,fieldCount,&#8221;,&#8221;))#<br />
&lt;br&gt;<br />
&lt;/cfoutput&gt;<br />
&lt;/cfloop&gt;</p></blockquote>
<p>Notice we are just displaying the raw value of the fieldname element and then we must EVALUATE the same thing to pull the value from the form field posted to our action page.  In fact, you can run the template at this point and you should see a list of the form fields, and equal symbol followed by the value submitted in said form field.</p>
<p>To insert the record, we just need to loop our results inside a CFQUERY tag like so:</p>
<blockquote><p>&lt;cfquery name=&#8221;qInsert&#8221; datasource=&#8221;MyDSN&#8221;&gt;<br />
insert into users<br />
(&lt;cfloop from=&#8221;1&#8243; to=&#8221;#ListLen(form.fieldnames)#&#8221; index=&#8221;fieldCount&#8221;&gt;<br />
#ListGetAt(form.fieldnames,fieldCount,&#8221;,&#8221;)#&lt;cfif fieldCount lt #commas#&gt;<strong>,</strong>&lt;/cfif&gt;<br />
&lt;/cfloop&gt;)<br />
values<br />
(&lt;cfloop from=&#8221;1&#8243; to=&#8221;#ListLen(form.fieldnames)#&#8221; index=&#8221;fieldCount&#8221;&gt;<br />
&#8216;#Evaluate(ListGetAt(form.fieldnames,fieldCount,&#8221;,&#8221;))#&#8217;&lt;cfif fieldCount lt #commas#&gt;<strong>,</strong>&lt;/cfif&gt;<br />
&lt;/cfloop&gt;)<br />
&lt;/cfquery&gt;</p></blockquote>
<p>Notice I&#8217;m running the loop twice, once for my list of column names (remember we made sure that our table has the same column names as we used for our form field names) and then once for the corresponding values.  Also key here is the CFIF blocks in each loop to determine if we need a comma.  I know I need one less comma than I have form fields so I place one as long as our loop count is less than the number of elements in the FIELDNAMES array.</p>
<p>That&#8217;s it, you now have an action form that can process any number of form fields and any changes you make will automatically be accomodated for.  Just remember any changes to your database table must be reflected in your form.  Here is our <a href="http://brad.melendy.com/projects/coldfusion/fieldnames/form_data.cfm" target="_blank">working sample</a>:</p>
<p><a href="http://brad.melendy.com/projects/coldfusion/fieldnames/form_data.cfm" target="_blank">http://brad.melendy.com/projects/coldfusion/fieldnames/form_data.cfm</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D175';
  addthis_title  = 'Parsing+the+FIELDNAMES+Variable+for+Dynamic+Form+Processing';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=175</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get the MAC Address with Java</title>
		<link>http://brad.melendy.com/?p=173</link>
		<comments>http://brad.melendy.com/?p=173#comments</comments>
		<pubDate>Tue, 18 Nov 2008 19:58:46 +0000</pubDate>
		<dc:creator>brad</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://brad.melendy.com/?p=173</guid>
		<description><![CDATA[I recently needed to get the MAC address from staff workstations as a means of uniquely identifying which remove office the PC resided in.  Network IP was not reliable because multiple offices share the same router.  Cookies weren&#8217;t good enough because systems get wiped each night in an automated process to maintain a static workstation [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to get the MAC address from staff workstations as a means of uniquely identifying which remove office the PC resided in.  Network IP was not reliable because multiple offices share the same router.  Cookies weren&#8217;t good enough because systems get wiped each night in an automated process to maintain a static workstation image.  That left either reconfiguring the networks at multiple locations, or to find a unique identifyer on each system that persists.  Here&#8217;s to the MAC address which is unique to each network adapter. </p>
<p>So, to do this qould require I use some kind of deployable application that can access the local system.  As I searched around, it appeared Java was a good option but I haven&#8217;t used Java outside school.  Luckily, I stumbed across <a href="http://techdetails.blogmatrix.com/:entry:techdetails-2008-02-11-0000/" target="_blank">Tim Desjardins&#8217; blog entry </a>on the topic.  He had written a java applet to do this very task. </p>
<p>I ran into one oddity with Windows Vista.  It will produce multiple MAC addresses (for loopback adapters and such) and some will actually contain only spaces.  I used Javascript to clean up the results and got a working demo here:</p>
<p><a href="http://brad.melendy.com/projects/java/macAddress.cfm">http://brad.melendy.com/projects/java/macAddress.cfm</a></p>
<p>You will be prompted to allow the applet to run on your system through a browser security warning.  Once you give consent, the button will display one or more of your MAC addresses in a Javascript alert.  I am capturing this information into a database as a unique identifier for each workstation.  I actually store it in a cookie for the duration of the day, but each morning I collect it anew as staff/visitors enter a particular system.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fbrad.melendy.com%2F%3Fp%3D173';
  addthis_title  = 'Get+the+MAC+Address+with+Java';
  addthis_pub    = 'bmelendy';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://brad.melendy.com/?feed=rss2&amp;p=173</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
