I am having  a issue with a cffform trying to update a db. When I did this with 
an html form there was no problem, and I can't figure out why I can get the ID, 
but not the rest of the data.

Any help is greatly appreciated,
Thanks so much
John

<!---index.cfm--->
<cfquery name="GetArtists" datasource="CF8introArtgallery">
         SELECT ArtistID, FirstName, LastName
         FROM Artists
         ORDER BY  ArtistID ASC
</cfquery>

<table>
  <tr>
    <th>Artists ID</th>
     <th>First Name</th>
    <th>Last Name </th>
    <th>Action</th>
  </tr>
<cfoutput query="GetArtists">
  <tr>
    <td>#ArtistID#</td>
    <td>#firstname#</td>
    <td>#lastname#</td>
    <td><a href="updateform.cfm?ArtistID=#ArtistID#">Update</a> | 
        <a href="deleteform.cfm?ArtistID=#ArtistID#">Delete</a></td>
        
  </tr>
</cfoutput>
  <tr>
    <td><a href="insert_form.cfm">Add a new record</a></td>
  </tr>
</table>

<!---updateform.cfm--->
<cfquery name="qGetArtists" datasource="CF8introArtGallery">
SELECT *
FROM Artists 
WHERE ArtistID = #URL.ArtistID#
</cfquery>

<table>
<cfoutput query="qGetArtists">
<cfform action="update_action.cfm" method="Post">
  
   
   <tr>
    <td width="93">Artists ID</td> 
    <td width="286"><cfinput name="ArtistID" type="text" value="#ArtistID#" 
size="25"></td>
</tr>
<tr>
  <td>First Name </td>
    <td><cfinput type="Text" name="FirstName" id="#FirstName#" size="50"></td>
    
  </tr>
  
  <tr>
  <td width="111">Last Name </td>
    <td width="457"> <cfinput type="Text" name="LastName" id="#LastName#" 
size="50"></td>
  </tr>
  <tr>
    <td>Address</td>
    <td> <cfinput type="Text" name="Address" id="#Address#" size="50"></td>
  </tr>
  <tr>
  <td width="111">City </td>
    <td width="457"> <cfinput type="Text" name="city" id="#city#" 
size="50"></td>
  </tr>
  <tr>
    <td>State</td>
    <td> <cfinput type="Text" name="state" id="#state#" size="50"></td>
  </tr>
  
  <tr>
    <td>Postal Code</td>
    <td> <cfinput type="Text" name="PostalCode" id="#PostalCode#" 
size="50"></td>
  </tr>
  
    <tr>
    <td>Email</td>
    <td> <cfinput type="Text" name="Email" id="#Email#" size="50"></td>
  </tr>
  
   <tr>
    <td>Phone</td>
    <td> <cfinput type="Text" name="Phone" id="#Phone#" size="50"></td>
  </tr>
  
   <tr>
    <td>Fax</td>
    <td> <cfinput type="Text" name="Fax" id="#Fax#" size="50"></td>
  </tr>
  
   <tr>
    <td>Password</td>
    <td> <cfinput type="Text" name="thepassword" id="#thepassword#" 
size="50"></td>
  </tr>

<tr>
    <td>&nbsp;</td>
    <td><cfinput type = "submit" name="update" class="button" value = 
"Update"></td>
</tr>
</cfform>
</table>

</cfoutput>

<!--- update_action.cfm--->
<cfupdate datasource="CF8introArtgallery" tablename="artists">

<!--- display the tip that was entered into the database--->
   The following information was written to the Database         
  <cfoutput><br />
  FirstName - # FirstName# <br  />
  LastName - #LastName# <br  />
  Address - #Address#  <br  />
  City - #City#  <br  />
  State - #State# <br  />
  Postal Code - #PostalCode# <br  />
  Email - #Email# <br  />
  Phone - #Phone# <br  />
  Fax - #Fax# <br  />
  password - #thepassword# <br  />
  </cfoutput> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4498
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to