Don’t Drive This Over 50 or It’ll Blow Up!!!

<!--- include template for document header --->
<cfinclude template="dochead.cfm">

<!-- updateFrogConfirm.cfm: template to enter frog data into the 
     froggy table and display updated info. -->

<!--- Use the cfquery tag to insert the updated frog contact info into the 
      "froggy" table --->   
      <cfquery name="updFrogs" datasource="#application.DS#">
         UPDATE froggy 
                SET frogName='#form.frogName#',
                frogColor='#form.frogColor#',
                frogEyeColor='#form.frogEyeColor#',
                frogHairColor='#form.frogHairColor#',
                obnoxiousnessRating='#form.obnoxiousnessRating#',
         WHERE frogID=#form.frogID#       
</cfquery>

<!--- Query the froggy table again, using the value of frogID to retrieve
      all of the data entered for the frog just updated --->
      
<cfquery name="getFrog" datasource="caramel-i275015">
   SELECT frogID, frogName, frogColor, frogEyeColor, frogHairColor, obnoxiousnessRating
   FROM froggy
   WHERE frogID = #form.frogID#
</cfquery> 

<!-- Begin frog display table -->

<h2>Frog Data Updated:</h2>
<div id="tbl">
<table cellspacing="0">
   
<!--- Use the cfoutput tag to output the data retrieved in the getRecord query.
      Because only one record is being retrieved, the table used here will 
      output one or several related fields per row. ---> 

<cfoutput query="getFrog">
        
  <tr>
    <td class="bld">Frog ID:</td><td>#frogID#</td>
  </tr>
  <tr>
    <td class="bld">Frog Name:</td><td>#frogName#</td>
  </tr>
  <tr>
    <td class="bld">Frog Color:</td><td>#frogColor#</td>
  </tr>
  <tr>
    <td class="bld">Frog Eye Color:</td><td>#frogEyeColor#</td>
  </tr>
  <tr>
    <td class="bld">Frog Hair Color:</td><td>#frogHairColor#</td>
  </tr>
  <tr>
    <td class="bld">Frog Obnoxiousness Rating:</td><td>#obnoxiousnessRating#</td>
  </tr>
</table>

<!--- email updated contact info to frog --->
<cfmail
     to="froggy@badisp.com"
     from="acourtois@badisp.com"
     subject="Updated Frog Info"
     Here is your updated frog information:
     
     Frog Name: #frogName#
     Frog Color: #frogColor#
     Frog Eye Color: #frogEyeColor#
     Frog Hair Color: #frogHairColor#
     Obnoxiousness Rating: #obnoxiousnessRating#
</cfmail>

<!-- Return to welcome or frog update page -->

<p><a href="updateFrog.cfm">Update more info</a>?</p>
</cfoutput>

</div>

<!--- include template for document header --->
<cfinclude template="docend.cfm">

Necessary disclaimer: I doubt there are any people in my class who know where my blahg is. If there are, I haven’t tested this code. It isn’t part of the project. It probably doesn’t work. Well, it *definitely* doesn’t work! ’cause it isn’t real and there is no “froggy” table and there’re prob’ly about a million billion typos in my code. And your project is prob’ly better than mine! Good luck and seeya Monday. I’m struggling as much as you are. 🙂

grok grok. Whaddya mean, “Obnoxiousness rating?” Frgok grok.

4 Responses to “Don’t Drive This Over 50 or It’ll Blow Up!!!”

  1. Webmomster Says:

    and here I thought that Froggy was trying to set up a “Froggy Web Dating Service”…

  2. Pooh Says:

    Obnoxiousness Rating, Okay, that’s a good thing to know. Frog Hair Color? Hmm, frogs, toads, skinks, salamanders and axolotls don’t have hair.

    signed, a newt

    “She turned me into a newt, Sire!”
    “She did?”
    “Well, I got better, Sire.”

  3. frooogy Says:

    Grok grok. Well, *I* am a *frog* ‘n’ *I* have some nice *green* hair. ‘n’ green eyes with a bit o’ purple aroun’ th’ edges. grok grok grok!

    What’s a ol’ axolotl? C’n I have one? Grok grok. C’n I have th’ skink too? Grok grok.

  4. Pooh Says:

    Frooooooooogy, you are an exceptional frog, by any definition of the word exceptional! As a rule, the Class Amphibia has neither scales, feathers, nor fur. You however are in a class by yourself.

    (As retired teachers, so are my dad and Fran, , but that’s a different story.)