Forums
This topic is locked
adding captions for images with ASP pure upload
Posted 07 Jun 2006 19:12:31
1
has voted
07 Jun 2006 19:12:31 Kessa Thomas posted:
Hi,I'm trying to add a caption for each image uploaded using ASP image upload 2.1.6 but for some reason I can't seem to get the script to update the database.
<pre id=code><font face=courier size=2 id=code>
If (CStr(Request.QueryString("GP_upload"


strsql = "UPDATE ads SET "
strsql = strsql & " caption1 = '" & padQuotes(trim(cstr(request("caption1"

strsql = strsql & " caption2 = '" & padQuotes(trim(cstr(request("caption2"

strsql = strsql & " caption3 = '" & padQuotes(trim(cstr(request("caption3"

strsql = strsql & " caption4 = '" & padQuotes(trim(cstr(request("caption4"

strsql = strsql & " caption5 = '" & padQuotes(trim(cstr(request("caption5"

strsql = strsql & " caption6 = '" & padQuotes(trim(cstr(request("caption6"

strsql = strsql & " caption7 = '" & padQuotes(trim(cstr(request("caption7"

strsql = strsql & " caption8 = '" & padQuotes(trim(cstr(request("caption8"

strsql = strsql & " caption9 = '" & padQuotes(trim(cstr(request("caption9"

strsql = strsql & " caption10 = '" & padQuotes(trim(cstr(request("caption10"

strsql = strsql & " lastupdated = '" &date&" "& time & "',"
strsql = strsql & " step5comp=1 "
strsql = strsql & " WHERE ownersidx =" & session("ownersidx"


objconn.Execute(strsql)
end if
</font id=code></pre id=code>
It seems to be not getting the details from the form (because if I enter a value directly into the update (<pre id=code><font face=courier size=2 id=code>strsql = strsql & " caption1 = 'test'," </font id=code></pre id=code>

I've also tried changing:
<pre id=code><font face=courier size=2 id=code>
If (CStr(Request.QueryString("GP_upload"


</font id=code></pre id=code>
to ...
<pre id=code><font face=courier size=2 id=code>
If (CStr(UploadFormRequest("MM_update"



</font id=code></pre id=code>
... and to ...
<pre id=code><font face=courier size=2 id=code>
if request.form("Submit"

</font id=code></pre id=code>
..but neither worked.
Does anyone know what may be going wrong here as I've not encountered this problem before.
Thanks
Kieran