|
From: macca2727 on 17 Nov 2005 06:27 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 18 Nov 2005 14:28 Look at <cffile action="upload"> . Make sure you do <cftry> around it to catch any problems. it's fairly straightforward
From: macca2727 on 20 Nov 2005 00:03 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 20 Nov 2005 15:00 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 |