I have a form that uploads varouis text elements to a database. This form also uses aspupload to up load an image to a folder on the server whilst adding the iames name to the database.<BR><BR>All works fine<BR><BR>I now have to add a pdf facility to this form. I just cannot seem to get my head around how i upload two different files to different floders on the server as well as adding two different filenames into the database.<BR><BR>Im going to have to do a code dump here. There is no way i can explain how i have got to the stage i am now.<BR>I am not expecting anyone to fix this for me just some pointers would be great.<BR><BR>Thanks in advance<BR>*************************************** ************<BR>Set SG_form = Server.CreateObject("Persits.Upload")<BR><BR> SG_file = SG_form.Save("C:webppliancedomainsinetpubwwwrootim ages\")<BR> &#039;Response.write SG_file<BR> If SG_file = 1 Then<BR> &#039;If InStr(SG_file,".jpg") Or InStr(SG_file,".gif") Then<BR> Ppict = SG_form.Files(1).Path<BR> &#039;Response.write Ppict<BR> &#039;End IF<BR> Else<BR> Ppict = "D:wwwROOT308wwwimages
opic.gif"<BR><BR> End If<BR> <BR>If SG_form.Form("Pid") &#060;&#062; "new" Then &#039; main choice if statement<BR><BR>adSQL = "SELECT * FROM tblProperties WHERE Pid =" & SG_form.Form("Pid")<BR>adRs.Open adSQL , adConn , 1, 3<BR>If SG_form.Form("Ptown") = "" Then<BR>pTw = SG_form.Form("Ptown1")<BR>Else<BR>pTw = SG_form.Form("Ptown")<BR>End If<BR>adRs("Ptown") = pTw<BR>adRs("Paddress") = SG_form.Form("Paddress")<BR>adRs("Plocation") = SG_form.Form("Plocation")<BR>adRs("Paccomodation") = SG_form.Form("Paccomodation")<BR>If SG_form.Form("Parea") &#060;&#062; "" Then<BR>adRs("Parea") = Cstr(SG_form.Form("Parea"))<BR>End If<BR>adRs("Ptype") = SG_form.Form("Ptype")<BR>&#039;Get the file name and stick it in the database<BR>If SG_file = 1 Then<BR>If InStr(Ppict,".jpg") Or InStr(Ppict,".gif") Then<BR>fileP = Split(SG_form.Files(1).Path,"\")<BR>fName = UBound(fileP)<BR>&#039;If deleted &#060;&#062; "1" then<BR>adRs("Ppicture") = fileP(fName)<BR>&#039;End If<BR>ElseIf InStr(UCASE(Ppict),"REMOVE") Then<BR>adRs("Ppicture") = ""<BR><BR>End If<BR>End If<BR>&#039;Response.write UBound(fileP)<BR>adRs.Update<BR>adRs.Close<BR>strO utput = "Your changes have been made <BR> they are now viewable from the main website"<BR>