storing form data in file, emailing URL

Results 1 to 2 of 2

Thread: storing form data in file, emailing URL

  1. #1
    Huey Guest

    Default storing form data in file, emailing URL

    I&#039ve dug myself into a hole over something that seems simple and common but I&#039ve not found any code examples or help so far.<BR><BR>My client&#039s site needs one order form to take a credit card number, for a catalog, thats it. Secure certificate & SSL already done. Now I need to let the client take orders through e-mail,<BR>preferably w/out them having to install PGP.<BR><BR>How do I write the form responses to an HTML page (will be on the secure site of course) and send the person taking orders it&#039s URL in an e-mail everytime the form is submitted? I&#039ve got e-mails with a such a URL before, so I think this is done often.<BR><BR>Is there a script available or an explanation somewhere?<BR><BR> Thanks!<BR> Huey

  2. #2
    Charles Guest

    Default RE: storing form data in file, emailing URL

    That is two seperate actions:<BR><BR>1. Writing the data:<BR>here is a code I use to add names to a listserv you can modify it to write html instead...<BR>&#039update users on mid-atlantic list serv<BR>sub updateSubscription(email, oldemail)<BR>if email &#060;&#062; "none" and email &#060;&#062; oldemail and oldemail &#060;&#062; "none" then<BR> set text_object=server.CreateObject("Scripting.FileSys temObject")<BR> set file = text_object.OpenTextFile("e:imaileclubweblistsmid-atlanticusers.lst") <BR> a = 0<BR> e = 0<BR> do While not file.AtEndOfStream<BR> t = file.readline<BR> if t &#060;&#062; oldemail and t &#060;&#062; email then<BR> Redim preserve array1(a)<BR> array1(a) = t<BR> a = a + 1<BR> arrayLength = a <BR> end if<BR><BR> loop<BR> file.close<BR> set file2 = text_object.CreateTextFile("e:imaileclubweblistsmi d-atlanticusers.lst", true)<BR><BR> Do While e &#060; arrayLength<BR> line = array1(e)<BR> file2.WriteLine(line)<BR> e = e + 1<BR> loop<BR> if email &#060;&#062; "" then file2.WriteLine(email)<BR> file2.close<BR>end if<BR>end sub<BR><BR>you probably don&#039t need the whole reading part, but you can disect it and change it however you need it.<BR><BR>2. Sending an email:<BR><BR>I use a freeware cgi script called "Soupermail" from<BR>then I&#039d create a form with a hidden field of "URL" and the appropriate value and use an onclick event to submit it it with Soupermail.<BR><BR>Hope that helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts