| Author |
Topic Search Topic Options
|
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Topic: how do you use ASP Upload? Posted: 12 May 2003 at 7:05am |
i posted about this before: http://forums.webwiz.net/forum_posts.asp?TID=1866&KW=scotty%5F32
but it doesnt want to work i cant get the values from the Form
its becose of the " ENCTYPE="multipart/form-data" "
i dont get it, because i want to add it some info to a database, and then upload a picutre and put the name from one of the form fields, but i cant get any values, anyone know how i can do this?
or does anyone know wot other upload components FastHosts have, that i could use?
|
 |
WebWiz-Bruce
Admin Group
Web Wiz Developer
Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
|
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2003 at 7:30am |
Have a look on Persits web site who make ASpUpload they have loads of samples on there on how to use the component, a search on google will find their site.
When using the component you can't use Request.Form to get the values from other text fileds in the form, instead you get these values using the upload component. But if you have a llok at the samples on Persits web site it has it all there.
Fasthosts don't support any other upload components.
|
|
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2003 at 8:39am |
i have looked on there site (aspupload.com or sumfin) but i cant get it workin the example they have
i am using the "upload.form("field")" and thats wot i cant get the value from, the only way i can get a value is gettin rid of the ASP Upload component and usin the Request.Form - but that isnt helpfull as i wanna upload a picture if ya click on my past post, you'll see i put a link to the example am tryna use/edit
it works if i dont touch it, but it doesnt help, cose i wanna upload more then 1 picture, and i want sum of the pictures to go into a different folder
|
 |
ultramods
Groupie
Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
|
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2003 at 8:51am |
Heres a sample piece of code which i use to get form details.
<%
Dim make, model
For Each Item in Upload.Form
IF Item.Name = "make" THEN make = Item.Value END IF
IF Item.Name = "model" THEN model = Item.Value END IF
NEXT
%>
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2003 at 9:03am |
nope that dont work, soz
shouldnt this work thought?
Page1:
<FORM METHOD="POST" ENCTYPE="multipart/form-data" ACTION="page2.asp">
<INPUT TYPE=TEXT NAME="field">
<INPUT TYPE=SUBMIT VALUE="Submit">
</form>
Page 2:
<% Set Upload = Server.CreateObject("Persits.Upload.1") %>
<%=upload.form("field") %>
<% set Upload = nothing %>
shouldnt that work thought? but it doesnt 
or have a just done it all wrong  
|
 |
ultramods
Groupie
Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
|
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2003 at 9:09am |
|
what error did you get when you tried the method i gave you. If i remember correclty you have to run that code after the pics have been entered into the directory. I haven't used your method so not sure
Edited by ultramods
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2003 at 10:41am |
no, at the moment am tryin to get a value from a normal text field,
when ive done that, am goin to add the code to upload the pictures, i have that but i made a new page so i could get it to retreve the values
i dont get errors.... it just doesnt show any text
like i'll put "text = <% = upload.form("field")" but all i get in the page is "text ="
its like i left the field blank ( i didnt, and i have got it the right name and everyfin)
any ideas?
|
 |
ultramods
Groupie
Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
|
Post Options
Thanks(0)
Quote Reply
Posted: 12 May 2003 at 10:46am |
|
Try saving the pics first then try retrieving the form data using the method I gave you.
|
 |