infocusweb
Technical User
hey folks - here is my dilemma - I can upload multiple files to a directory but I can't add both filenames to the database. here's what's going on:
ImageONE: <INPUT NAME="FileName1" SIZE=30 TYPE=FILE required=yes message="please select a small image">
<BR>
ImageTWO: <INPUT NAME="FileName2" SIZE=30 TYPE=FILE required=yes message="please select a large image">
<cfif IsDefined("filename1"
>
<cftry>
<CFFILE DESTINATION="user\placewherephotosarestored\photos\"
ACTION="UPLOAD"
NAMECONFLICT="OVERWRITE"
MODE="666"
FILEFIELD="filename1">
<cfcatch type="any">
</cfcatch>
</cftry>
</cfif>
Which seems to work and but:
<cfquery datsource=datasource>
INSERT INTO Photos
(ImageONE,ImageTWO)
VALUES
('#File.ClientFileName#.#File.ClientFileExt#,'#File.ClientFileName#.#File.ClientFileExt#')
</cfquery>
ClientfileName Attibute can't differentiate between ImageONE and ImageTWO so it enters the the first value into both fields.
Can anyone help me out with this. Thanks!
http//
ImageONE: <INPUT NAME="FileName1" SIZE=30 TYPE=FILE required=yes message="please select a small image">
<BR>
ImageTWO: <INPUT NAME="FileName2" SIZE=30 TYPE=FILE required=yes message="please select a large image">
<cfif IsDefined("filename1"
<cftry>
<CFFILE DESTINATION="user\placewherephotosarestored\photos\"
ACTION="UPLOAD"
NAMECONFLICT="OVERWRITE"
MODE="666"
FILEFIELD="filename1">
<cfcatch type="any">
</cfcatch>
</cftry>
</cfif>
Which seems to work and but:
<cfquery datsource=datasource>
INSERT INTO Photos
(ImageONE,ImageTWO)
VALUES
('#File.ClientFileName#.#File.ClientFileExt#,'#File.ClientFileName#.#File.ClientFileExt#')
</cfquery>
ClientfileName Attibute can't differentiate between ImageONE and ImageTWO so it enters the the first value into both fields.
Can anyone help me out with this. Thanks!
http//