Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPLOADING MULTIPLE FILES AND DATA AT THE SAME TIME

Status
Not open for further replies.

kingjjx

Programmer
Sep 18, 2001
181
US
how do i upload multiple files and data at the same time ??
such as:

name:
car:
picture: [browse] <- button to browse for file on local drive

name:
car:
picture: [browse]

[submit] [cancel]

 
Do you mean how you get that information to display from a database, or do you mean how do you upload the choices made to a database?
 
i mean to display from a database becasue the name and car data is stored in a database and the images are stored in a directory folder, is there anyway to link the 2 together ?

thank you
-jon
 
You should put the image file names in the database, then you can point to the file names using <img src=&quot;#picturepathandname#&quot; when you output each car.
 
You should put the image file names in the database, then you can point to the file names using <img src=&quot;#picturepathandname#&quot;> when you output each car.
 
but the quesion was how to upload multiple files at the same time right?

what I usually do, is give each &quot;file&quot; field a different name &quot;car1, car2, car3, etc...&quot; and process each one manually.

<cfif #car1# NEQ &quot;&quot;>
<cffile action=&quot;upload&quot; filefield=&quot;car1&quot; accept=&quot;image/*&quot; destination=&quot;/your_images_dir&quot; nameconflict=&quot;MakeUnique&quot;>
<cfset car1_filename = #File.ServerFile#>
</cfif>

<cfif #car2# NEQ &quot;&quot;>
<cffile action=&quot;upload&quot; filefield=&quot;car2&quot; accept=&quot;image/*&quot; destination=&quot;/your_images_dir&quot; nameconflict=&quot;MakeUnique&quot;>
<cfset car2_filename = #File.ServerFile#>
</cfif>


do that for each one and you'll have all of your filenames, then input them into your database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top