Relearning why I never wanted to be a programmer

Checkboxes, when unchecked, don’t send with the form. It makes sense. Therefore, when updating the database if this box is checked or not, I need to be sure the form field exists on the sent page.

It’s fine though! ColdFusion has a function for that!

Wait a second…

This doesn't seem right

I kept looking, mostly using the ColdFusion 8 documentation, and I saw something: quotation marks. Bang boom add ’em in and it works. ColdFusion’s idea of what does and doesn’t need quotation marks is a little difficult after 4 years of programming in C, plus two before that when I programmed in Visual Basic. In my mind, form.formwhatever is a variable, not a string. Yeah, so it might have a string inside it, but we’re not checking for that, are we? We want to see if a variable exists, and variables don’t hang out inside quotation marks. That’s what strings do.

The lesson here, honestly, is pay attention to syntax. Just because it seems stupid doesn’t mean you can ignore it, so you should save yourself the hassle and make sure the syntax is correct.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: