O'k this is my problem Coldfusion fans, When changing the Form into FORMAT="Flash" I get problems updating the database when submitted.
but when using the <cfinput type="submit"
name="submit" value="update">
The name attribute is required. But when submitted it displays an error saying basically that the submit attribute is unknown in the table and thats because their is no submit col in the table - here the code.
update page:CODE
<cfquery datasource="learning" name="MovieUpdate">
SELECT MovieID, MovieTitle, image, MovieDesc
FROM Movies
WHERE MovieID=#URL.MovieID#
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<link rel="stylesheet" type="text/css" href="../../template/product_list.css">
<link rel="stylesheet" type="text/css" href="../../troop/style.css">
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>
<body>
<cfinclude template="../../troop/header.cfm"><br />
<div id="outerContainer">
<cfset submit = ("Form.Submit")>
<cfform format="flash" action="../../flashdump.cfm" method="post" preservedata="yes" > <table width="90%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td>Movie Title</td>
<td><cfinput type="hidden" name="MovieID" value="#MovieUpdate.MovieID#"></td>
</tr>
<tr>
<tr>
<td>Movie Title</td>
<td><cfinput type="text" name="MovieTitle" value="#MovieUpdate.MovieTitle#" size="90"></td>
</tr>
<tr>
<td>Movie Image</td>
<td><cfinput type="text" name="image" value="#MovieUpdate.image#" size="90"></td>
</tr>
<tr>
<td>Movie Description</td>
<td><cftextarea name="MovieDesc" cols="88" rows="3" value="#MovieUpdate.Moviedesc#" ></cftextarea></td>
</tr>
<tr>
<td> </td>
<td><label>
<cfinput type="submit" name="submit" value="submit">
></td>
</tr>
</table>
</cfform>
</div>
<cfinclude template="../../troop/footer.cfm">
</body>
</html>
and the Processing page:
CODE
<cfupdate datasource="learning" tablename="movies">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<link rel="stylesheet" type="text/css" href="../../template/product_list.css">
<link rel="stylesheet" type="text/css" href="../../troop/style.css">
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
</head>
<body>
<cfinclude template="../../troop/header.cfm"><br />
<div id="outerContainer">
<div align="center">
<cfoutput><span class="Title">#FORM.MovieTitle# and this has been successfully Updated in our Database. Thankyou <a href="../index.cfm">Return</a></span></cfoutput> </div>
</div>
<cfinclude template="../../troop/footer.cfm">
</body>
</html>
What do I need to do, Im totally stumped and would really use the help!
Thanks for reading.