CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 I'll send you $25 if you can help me with upload

Print topic Send  topic

Author Message
Sarah
Posted: 02/25/2002, 8:52 AM

I have a page called AdminDocumentRecord that I need to add an upload to that will
1. Upload a file to a folder called documents
2. Redirect the user to a page called AdminDocumentGrid
3. Populate a url feild on the table of AdminDocumentGrid called document_link

I would really appreciate any help I could get with this, I have been trying to figure it out myself but just cant get anything to work and I have a deadline coming up. I'll happily send anyone who can help accomplish this $25 through paypal.
TIA!
Sarah
AudiTT @ Mci
Posted: 02/25/2002, 9:04 AM

I have this working.. well sort of like this.. You are welcome to the source code if you would like...

Bryan
Sarah
Posted: 02/25/2002, 9:41 AM

I would love the code Bryan, My email issarah@clearweb.biz . Thanks
AudiTT @ Mci
Posted: 02/25/2002, 10:15 AM

Here goes... I think every one needs this...

This is my Form Statement.

<form method="POST" action="\cm\files\UploadResponce.asp" enctype="multipart/form-data">
<input type="hidden" name="CMR" maxlength="" value="<%= ToHTML(fldCMR) %>" size="" >
Select a file to upload: <input type="file" name="File1" size="30">
<input type="submit" name="submit" value="Upload Now">
</form>

You can set sessions for your keyfileds.. If I knew more, I would talior it for you...

Here is my UploadResponce.asp

<!-- #INCLUDE FILE="../Common.asp" -->
<%
Dim upl, NewFileName
Set upl = Server.CreateObject("ASPSimpleUpload.Upload")
If Len(upl.Form("File1")) > 0 Then
UserLogin=cn.execute("Select username from PPD_Active_Accounts where UserID="&Session("UserID")).fields.item(0)
strCMR= upl.Form("CMR")
strPath= "\cm\files\" & (strCMR)
NewFileName = (strPath & "\") & upl.ExtractFileName(upl.Form("File1"))
If upl.SaveToWeb("File1", NewFileName) Then
response.redirect("/cm/files/" & strcmr)
Else
response.redirect("../CMR_Upload.asp?Result=There was an error saving the file to disk.")
End If
End If
%>

You can add an insert statement to add records to your data base.. Again I don't know your field names or what database you are useing.

The key to getting field information from one for to the next.. well the easiest is cookies (session). I use it all the time.. Just dont make the mistake of resetting them after use.

Hope this can help you.. Bryan
AudiTT @ Mci
Posted: 02/25/2002, 10:16 AM

Spelling correction ;p

The key to getting field information from one for to the next.. well the easiest is cookies (session). I use THEM all the time.. Just dont make the mistake of NOT resetting them after use.
Sarah
Posted: 02/25/2002, 1:23 PM

I'm using php 4 with templates. Any way you can help me translate that code?
Sorry I wasn't very specific!
Sarah
Sarah
Posted: 02/25/2002, 2:47 PM

Bryan, you also mentioned tayloring it for me. Seeing as I need all the help I can get, I would be happy to send you, or anyone else who could help, any info they need. The database name is "morris_customer" the table is "document" the feilds are:
item_id >Primary, auto increment, is hidden on the AdminDocumentGrid(I added the item_id trying to make the phpupload work with my site)
document_number
document_date
document_link this is the feild that will be a url
company_id < links to another table for company info
user_id
date_added
Thanks,
Sarah
Sarah
Posted: 02/26/2002, 8:05 AM

I realy need to get this done, is there someone who could offer there services for a price. I can't afford much, but really need to get this done and I've been playing with scripts for days trying to acomplish this with no luck. I'm very frustrated and tired of messing with it.
TAI
Sarah
EO
Posted: 02/26/2002, 3:37 PM

If you havent worked out the file upload I have one of four scripts to use. depends on the server type. cgi or asp.

my email is eric_orr@hotmail.com
Sarah
Posted: 02/27/2002, 8:46 AM

I'm still waiting for some code so the $25. is still up for grabs.
Ken
Posted: 02/27/2002, 12:36 PM

Sarah I am also usign php4 with templates and use up load code all sorts of places. Here is a link to a page that you can view source to get the code.

http://www.jobs4gems.com/upload.html

Hope this helps!

Ken
KAB WEBs
Nandan
Posted: 02/27/2002, 1:29 PM

AdminDocumentRecord.asp
<form METHOD="POST" ENCTYPE="multipart/form-data" NAME="photo" action="Upload.asp">
<input type="file" name="txtph">
<input type="submit" name="cmdsub" value="Submit">
</form>


Upload.asp

set up1 = server.CreateObject("SoftArtisans.FileUp")
CustomPath = Server.MapPath ("../Documents")
Filename = Mid(up1.UserFilename,InStrRev(up1.UserFilename,"\")+1)
strF= CustomPath & "/" & Filename
up1.SaveAs strF

Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
set rsBioJournal = Server.CreateObject("ADODB.Recordset")
set rsJournal = Server.CreateObject("ADODB.Recordset")
OBJdbConnection.Open Application("Connection1_ConnectionString")
OBJdbConnection.CommandTimeout = 60

SQLQuery = "Query"
Set rsBioJournal = OBJdbConnection.Execute(SQLQuery)

Response.Redirect("AdminDocumentGrid.asp")

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.