Form not working

Coldfusion file upload not working

Page 1 of 1

0 Replies - 534 Views - Last Post: 13 February 2008 - 06:04 PM

#1 parenteau  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 12-February 08

Form not working

Posted 13 February 2008 - 06:04 PM

I don't know why this isn't working...
and cant figure out how to redirect the page.
I am new at this and am really interested in developing what I design... but have run into some language barriers.
here is the code... I feel like I am losing my mind!!!

<form action="test.cfm" method="post" enctype="multipart/form-data"><cfif structKeyExists(form, "uploadfile")>
<cfset destination = expandPath("./files")>
<cfif not directoryExists(destination)>
<cfdirectory action="create" directory="#destination#">
</cfif>

<cffile action="upload" filefield="uploadfile" destination="#destination#" nameConflict="makeUnique" result="upload">
<cfdump var="#upload#">
</cfif>
	  <div align="center"><table width="500" border="0" align="center" cellpadding="7">
		<tr>
		  <td width="100%" bgcolor="#EEF1F7"><p align="center"><b><font face="Tahoma" size="2">Please make sure that the files you are uploading do <br />
			not have the same name as other files you have uploaded!</font></b> </p></td>
		</tr>
		<tr>
		  <td width="100%" bgcolor="#E1E6F0"><p align="center"><b><font face="Tahoma" size="2">Upload
			Options</font></b></p></td>
		</tr>
		<tr>
		  <td width="100%" bgcolor="#EEF1F7"><table border="0" width="100%" cellpadding="4">
			  <tr>
				<td width="34%" align="right" bgcolor="#E1E6F0" valign="top"><font face="Tahoma" size="2"><b>Select
				File To Upload:</b></font></td>
				<td width="66%" bgcolor="#EAEDF4"><p>
				  <input type="file" name="uploadfile" />
				  <br />
					<br />
					<input type="submit" value="Upload File" />



Is This A Good Question/Topic? 0
  • +

Page 1 of 1