Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / October 2005



Tip: Looking for answers? Try searching our database.

problem with merging input type "file" and inout type "text"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kevin - 21 Oct 2005 20:55 GMT
Hi,

I downloaded aspsmartupload in order to let the visitors of my site upload
files (their picture in jpg). It works perfect.
But in fact, i need to collect not only their picture, but also name,
address etc ...
So i combined both input types in one form like this:
<FORM METHOD="POST" ACTION="testuploadb2.asp" ENCTYPE="multipart/form-data">
INPUT TYPE="text" NAME="name" >
...
<INPUT TYPE="FILE" NAME="FILE1" >
<INPUT TYPE="SUBMIT" VALUE="Upload">
</FORM>

The ASP code is:
'----------------
Dim mySmartUpload
lol="kevin"
  Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
  mySmartUpload.Upload
For each file In mySmartUpload.Files
If not file.IsMissing Then
file.SaveAs("/Uploadjpg/" & lol & ".jpg")
end if
next
'-----------------------------
name=request.form("name")
....

But it doesn't work! (http 500 internal server error)
Any idea how to solve this?
Thanks
Ray Costanzo [MVP] - 21 Oct 2005 21:13 GMT
First of all, make it so that you can actually see your errors:
http://www.aspfaq.com/show.asp?id=2109

Secondly, this isn't really a database problem.

You have to use the upload object's collection of form data to get to the
form data.  Look in the sample code for your component, and this will
probably be explained.  You'll have to do something LIKE (I DON'T KNOW THE
EXACT WORDING FOR THIS COMPONENT)

Someformvalue = YourUploadObject.Form("nameofinput")

Ray at work

> Hi,
>
[quoted text clipped - 29 lines]
> Any idea how to solve this?
> Thanks
Kevin - 21 Oct 2005 22:39 GMT
Thanks a lot. It works now ...

> First of all, make it so that you can actually see your errors:
> http://www.aspfaq.com/show.asp?id=2109
[quoted text clipped - 43 lines]
> > Any idea how to solve this?
> > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.