1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Code Errors???

Discussion in 'C#' started by mkuethe, Apr 24, 2006.

  1. #1
    I am such a beginner at this and am in a crunch. I've got a form created and published to my site. It has text fields and also an option to upload a Word document from their systems. I can get the form to send data to my e-mail when I hit the submit button, but I cannot get it programmed to save the text into a database on the server and upload their document.

    What I want is the form text data to be populated into an Access database on the server. I then want the Word documents users upload to be saved in the "uploads" folder I've created on my site.
    SEMrush
    Can anyone provide me with the code I need to put on my form (in layman's terms) in order to get this to work properly when the "submit" button is hit? If you can use my examples, below it would be greatly appreciated!

    Examples only of hosting information:

    • Website - www.lp.com
    • ftp account on server - c:\web\64\_private
    • Directory for Word documents to be placed - www.lp.com/uploads
    • Access database location - www.lp.com/registration

    Below is just the Upload File code (from the browse button to the submit button)

    I've heard you may need an action code at the beginning of the document, but my form does not.

    Thanks for trying to help! If I wasn't in such a rush I would be able to figure it out for my self... eventually!

    <!-- additional information ends here -->
    <hr>
    <p class="textBoldRed14px">Upload File</p>
    <FORM name=oForm action=/scripts/cpshost.dll?PUBLISH?/http://www.lp.com/uploads/upload_stat.asp method=post encType=multipart/form-data>
    <INPUT type=file name=oFile1>
    <INPUT type=hidden value=/http://www.lp.com/uploads/ name=TargetURL>
    <P align=center>
    <INPUT type=submit value="Submit File">
    </P>
    <P align=center>&nbsp;</P>
    <P align=center>&nbsp; </P>
    </FORM>
    </body>
    </html>

    Thanks in advance and let me know if you need any additional information!
     
    mkuethe, Apr 24, 2006 IP
    SEMrush
  2. jaymcc

    jaymcc Peon

    Messages:
    139
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Here's a solution to one part, the file upload.

    http://www.asp101.com/articles/jacob/scriptupload.asp

    Saving the text to a database is not complex, try a google search for:

    asp access insert example

    The first few results should give you what you are looking for.

    J
     
    jaymcc, Apr 24, 2006 IP