<%= recordset("SearchName")%>, select the location of your photo by clicking
the 'Browse' buttom and press 'Submit' button
File Name:

<% set o = new clsUpload if o.Exists("cmdSubmit") then 'get client file name without path sFileSplit = split(o.FileNameOf("txtFile"), "\") sFile = sFileSplit(Ubound(sFileSplit)) o.FileInputName = "txtFile" 'o.FileFullPath = Server.MapPath(".") & "\" & sFile o.FileFullPath = Server.MapPath(".") & "\uploaded\" & sFile 'Response.write "This is the file and folder: " & o.FileFullPath 'Response.end o.save if o.Error = "" then 'response.write "Success. File saved to " & o.FileFullPath & ". Demo Input = " & o.ValueOf("Demo") 'New code to save photo starts here Dim DB_CONNECTIONSTRING 'Set an active connection to the Connection object using a DSN-less connection for MySql database DB_CONNECTIONSTRING = "Driver={MySQL ODBC 3.51 Driver};SERVER=p3nlmysql191plsk.secureserver.net;DATABASE=TheMightyTigers;UID=TheMightyTigers;PWD=dBest615#" %> <% Dim I ' Standard looping var Dim iRecordToUpdate ' Id of deleted record 'Step 1: Dim objRecordset dim thestreet Set objRecordset = Server.CreateObject("ADODB.Recordset") 'Step 2: ' Get the Id of the record to update This is a dummy record ' We will retrieve the the image file from this record iRecordToUpdate = lngRecordNo 'Response.write "This is the iRecordToUpdate or IdNO = " & iRecordToUpdate 'Response.end ' iRecordToUpdate = Request.Form("IDno") 'iRecordToUpdate = Request.QueryString("IDno") ' Response.Write Request.QueryString("IDno") ' Response.Write" This is the FullName : " & Request.QueryString("FullName") ' Response.Write" This is the Idno or record to update: " & iRecordToUpdate ' Response.end ' 'iRecordToUpdate = CLng(Request.QueryString("IDno")) iRecordToUpdate = Replace(iRecordToUpdate, "'", "''") ' If the record ID passed in isn't a number, we set it to ' one so we don't cause SQL query errors. I use 0 since I ' know there's no record in the DB with an id of 0 If IsNumeric(iRecordToUpdate) Then iRecordToUpdate = CLng(iRecordToUpdate) Else iRecordToUpdate = 0 End If 'Response.write ' I'm prebuilding our SQL query so it's easier to print ' out in case we need to debug later. I'm using a query ' that will return just the record we want to update. 'iRecordToUpdate = 161 'iRecordToUpdate = 553 strSQL = "SELECT * FROM parish WHERE idno=" & iRecordToUpdate & ";" 'Response.write strSQL ' Response.end ' The syntax for the open command is ' recordset.Open Source, ActiveConnection, CursorType, LockType, Options objRecordset.Open strSQL, DB_CONNECTIONSTRING, adOpenKeyset, adLockPessimistic, adCmdText 'Step 3:91 ' The recordset should only have the one record so: If Not objRecordset.EOF Then objRecordset.MoveFirst Response.write objRecordset.Fields("IdNo") & "Idno" ' Response.end 'Step 4: 'Only update if we've got a record, o/w we never run this 'objRecordset.Fields("Photo") = Request.Form("Active_Flag") ' objRecordset.Fields("Photo") = "images/" &p ' objRecordset.Fields("Photo") = "uploaded/" & fileName objRecordset.Fields("Photo") = "uploaded/" & sFile ' Response.write objRecordset.Fields("Photo") ' Response.end 'Step 5: 'Only update if we've got a record, o/w we never run this objRecordset.Update 'objRecordset.MoveFirst 'Response.write objRecordset.Fields("IdNo") & "Idno" ' Response.end Response.Write "" & vbCrLf Response.Redirect("Welcome.asp?idNo=" & lngRecordNo) else 'Response.Write "

Record id " & nameinput & " not found!

" & vbCrLf Response.Write strSQL End If objRecordset.Close Set objRecordset = Nothing 'Ends here else response.write "Failed due to the following error: " & o.Error end if end if set o = nothing %>