Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<!--- set default uploads --->
<cfparam name = "session.maxUpLoad" default = "5">
<!--- Check for max upload change --->
<cfif isdefined("form.maxUpLoadChanged")>
<!-- Check for valid input (A number and > 0) --->
<cfif val(form.newMaxUpLoad) gt 0>
<!--- set new max upload to user defined value --->
<cfset session.maxUpload = #val(form.newMaxUpLoad)#>
<cfelse>
<!--- Identify Invalid entery if input is not a number --->
<cfset invalidNumber = true>
</cfif>
</cfif>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Upload Form</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR>
</HEAD>
<BODY bgColor = "#ffffff">
<TABLE borderColor = "#000000" cellSpacing = "1" cellPadding = "3" width = "100%" bgColor = "#000000" border = "0">
<TR>
<TD vAlign = "bottom" noWrap align = "right" width = "129" bgColor = "#000000"><br></TD>
<TD noWrap width = "100%" bgColor = "#000000"><FONT face = "Tahoma, Arial, sans-serif" color = "#ffffff" size = "4"><STRONG> Max Upload Form</STRONG></FONT></TD>
</TR>
<TR>
<TD align="right" vAlign=center noWrap bgColor=#333366>
<FONT color = "#ffffff" size = "1" face = "Tahoma, Arial, sans-serif"><STRONG>Number Of files</STRONG></FONT>
</TD>
<!--- Begin max file number form --->
<form name = "changeMaxUploadForm" method = "post" action = "UploadForm.cfm">
<TD noWrap bgColor=#99ccff>
<!--- Begin invalid number error notification to user --->
<cfif isdefined("invalidNumber")>
<font color="#FF0000" size="2" face="Tahoma, Arial, sans-serif">Invalid Number Entered<br></font>
</cfif>
<!--- End invalid number error notification to user --->
<INPUT type = "text" size = "2" name = "newMaxUpLoad" value = "<cfoutput>#session.maxUpLoad#</cfoutput>">
<input type = "submit" name = "submit" value = "Update">
<!--- Identify's a number change after submit --->
<input type = "hidden" name = "maxUpLoadChanged" value = "y">
<FONT size="3" face="Tahoma, Arial, sans-serif">Change and submit before browsing for files.</FONT></TD>
</form>
<!--- End max file number form --->
</TR>
</TABLE>
<BR>
<!--- Do not show any file upload options if entry is invalid --->
<cfif not isdefined("invalidNumber")>
<br>
<!--- upload form --->
<FORM name = "UpLoad" action = "UploadAction.cfm" method = "post" enctype = "multipart/form-data". >
<!--- set form variable incase session times out --->
<input type = "hidden" name = "maxUpload" value = "<cfoutput>#session.maxUpload#</cfoutput>">
<TABLE borderColor = "#000000" cellSpacing = "1" cellPadding = "3" width = "100%" bgColor = "#000000" border = "0">
<TR>
<TD vAlign=bottom noWrap align=right width=129 bgColor=#000000><br></TD>
<TD noWrap width="100%" bgColor = "#000000">
<FONT face = "Tahoma, Arial, sans-serif" color = "#ffffff" size = "4"><STRONG> Upload Form</STRONG></FONT>
</TD>
</TR>
<!--- Create number of requested or default file download options --->
<cfloop from = "1" to = "#session.maxUpLoad#" index = "upLoadNumber">
<TR>
<TD align="right" vAlign = "center" noWrap bgColor = "#333366">
<!--- Identify file download number to the right of file --->
<FONT color = "#ffffff" size = "1" face="Tahoma, Arial, sans-serif"><STRONG>File Number <cfoutput>#upLoadNumber#</cfoutput></STRONG></FONT></TD>
<TD noWrap bgColor = "#99ccff">
<!--- Create file upload option with sequential numbers in loop --->
<input type = "file" name = "upLoad<cfoutput>#upLoadNumber#</cfoutput>" size = "40">
</td>
</TR>
</cfloop>
</TABLE>
<DIV align=center>
<TABLE cellSpacing=6 width=640 border=0>
<TR>
<TD>
<TABLE cellSpacing=6 align=center border=0>
<TR>
<TD>
<DIV align=center>
<INPUT type = "submit" value = "Submit" name = "submit">
</DIV></TD>
</TR>
</TABLE></TD>
</TR>
</TABLE>
</DIV>
<!--- End upload form --->
</FORM>
</cfif>
</BODY></HTML>
ACTION PAGE
<cfset physicalPath = "D:\[URL unfurl="true"]www\uploads">[/URL]
<cfloop from = "1" to = "#form.maxUpload#" index = "i">
<cfif IsDefined("FORM.upLoad#i#") and evaluate("FORM.upLoad"&i) neq "">
<cffile action = "Upload"
filefield = "form.upLoad#i#"
destination = "#physicalPath#uploads\temp"
nameconflict = "overwrite" >
<cfset files = arraynew(1)>
<cfset Files[i] = #cffile.clientfile#>
<cfoutput>#files[i]# Uploaded</cfoutput><br>
</cfif>
</cfloop>
<cfset files = arraynew(1)>
<cfset Files[i] = #cffile.clientfile#>
<cfset files = arraynew(1)>
<cfset Files[i] = #cffile.clientfile#>
<cfset sFiles = ArrayNew(1)>
<cfset sFiles[i] = #cffile.serverfile#>
<CFQUERY DATASOURCE="#xDB#" DBTYPE="ODBC">
INSERT INTO horseTable(horse_picture1, horse_picture2, horse_picture3)
VALUES '#sFiles[1]#', '#sFiles[2]#', '#sFiles[3]#
</CFQUERY>