I know that there has been a lot of posts about image uploading and believe I have read them all. I have created an a5w page that has a form to take an image and upload it to a directory(this works fine) and change the image with that x-file to the image uploaded. I am trying to change the image in the map_ field and change the tag field to an X. I have included the a5w page code. Thanks in advance.
Code:
<html> <%a5 dim msg1 as c = "" dim msg2 as c = "" dim record as c = "" dim xfile as c = "" dim t as p dim indx_1 as p dim vc_filename1 as c = "" dim ext as c = "" if eval_valid("cmd") vc_filename1 = xfil xfile = xfil ext=right(FileToUpload1.filename,4) vc_filename1 = xfil+ext file.from_blob(ServerSetting.Document_Root + "\\" + "Hadden" + "\\"+ "images" +"\\" + vc_filename1, FileToUpload1.data) t = table.open("haddenall") if FileToUpload1.data <>"" t.change_begin() indx_1 = t.index_primary_put("Xfile") t.fetch_find(xfile) record = t.recno() t.map_ = image_filename_encode(ServerSetting.Document_Root + "\\" + "hadden" + "\\"+ "images" +"\\" + vc_filename1) t.Tag = "X" t.change_end() end if t.close() end if %> <head> <title>File Upload example</title> </head> <body> <p><%a5 ? "Record No: "+record+" X-File: "+xfile %></p> <DIV="FILE_BOXES"> <div align=center> <form action=" <%a5 ? request.script_name %> " method=post encType=multipart/form-data> X-file: <input type="text" name="xfil"> <input type=file size=75 name=FileToUpload1><br> <input type=submit value="Upload File" name=cmd> </form> </div> <br><br> </body> </html>
Comment