Posting form data to email database with some catc

Results 1 to 2 of 2

Thread: Posting form data to email database with some catc

  1. #1
    HUI Guest

    Default Posting form data to email database with some catc

    This is what i want to do! I have a simple form (name,phone, address, email) I need to send this to a email and a database but here is the catch i also need to send the data to another email address with only a couple of the fields (name, email). Is this possible? Well if so help would be great. I would also like to send the data with a # like a ID but, be a hidden # in the form. Could this be randomly generated?<BR><BR>PLEASE HELPPPPP<BR><BR>Thanks HUI <BR>

  2. #2 Guest

    Default All possible + Easy, but asking a lot in one ques

    1. To store the fields in a db, create db, create table and write asp code to open connection to db, open recordset on table.<BR>Insert a new record in table thus:<BR>&#060;%<BR>rs.addnew<BR>rs("name") = reqest.form("name")<BR>rs("phone") = reqest.form("phone")<BR>rs("address") = reqest.form("address")<BR>rs("email") = reqest.form("email")<BR>rs.update<BR>%&#062;<BR><B R>2. This will depend on what email component you can use. CDONTS is part of the standard asp setup. JMail ( is quite good and easy to learn. Others include ASPMail. Basically while you still have acces to the formfields, you create your mail object, add recipients, set the sender (your email), build the body text, and execute the mail item. If you have some recipients to whom you want to send all the data, just do the above and concatenate all the fields into the mail item. Then for those that you want to send less , clear the existing recipients, and add the new ones, then build a body wtih the limited data and send again.<BR><BR>3. Not sure what you want to randomise, but you just use the randomise and rand functons to create a number in your desired range and then use that number however you want.<BR><BR>All these things a very basic uses of ASP, and easy, but if you are asking someone to show you alll the fine details, you are expecting a lot. Do your homework first, then come to the messageboard with one question at a time.

Posting Permissions

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