From: macca2727 on
i have a update table form, i need a upload image browse btn, to upload images
to my images folder, also i need the image file name to be put in to my table
column "imageone"

what would be the best way to do this?

thanks
Craig

From: quig06107 on
Look at <cffile action="upload"> . Make sure you do <cftry> around it to catch any problems. it's fairly straightforward
From: macca2727 on
so do i put <cffile action="upload"> into my forms action page? and what would
i have to do to specify my uplaod location as images folder.

and i need the file name to be put into my databases image column, how would i
do that

From: ShapeShift on
You could use something like this:



<cfif #FORM.FiletoUpload# NEQ "">
<cffile action="upload" destination="C:\" nameConflict="overwrite"
fileField="Form.FiletoUpload">
<cfquery name="UpdatePhoto" datasource="datasource">
UPDATE tablename
SET FileName = '#cffile.clientfile#.#cffile.clientFileExt#'
WHERE Username = '#FORM.Username#'
</cfquery>

 | 
Pages: 1
Next: Dereferencing scalar var as struct