Going <b>CRAZY!!</b> Need help

Results 1 to 3 of 3

Thread: Going <b>CRAZY!!</b> Need help

  1. #1
    Fazio82_7 Guest

    Default Going <b>CRAZY!!</b> Need help

    I have set up a form for a website. This page has "text" lines for first and last name, email add., comments, etc. I also have a submit button at bottom. How do I (and in what code would I) set it up to where whenever someone clicks on submit, the whole user&#039s input is emailed to my email address? Totally clueless and totally a beginner. Please help. It would be greatly appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: Going <b>CRAZY!!</b> Need

    There are several ways and languages you could use to accomplish this. Since you&#039re a beginner the easiest and best way would be to use your servers sendmail program. Check with your host on the admin control panel and typically they have cut and paste code for you to use in your form.

  3. #3
    Vinnie Guest

    Default RE: Going <b>CRAZY!!</b> Need

    I wrote this the other day while setting up something similar, just replace the request.form("fields") w/ your own fields that make the name="attribute" of your form. This is in it&#039s simplest form, you an add whatever you like to customize the email, add extra options, etc. Do some reading on the CDONTS email object in ASP 3.0 (this code is assuming you&#039re using asp 3.0):<BR><BR> &#039Declare variables<BR> Dim cdoContact &#039newmail object<BR> Dim cdoFrom &#039form user<BR> Dim cdoTo &#039recipient&#039s email address<BR> Dim cdoBody &#039generic msg body<BR> Dim cdoAppend &#039form input appended to mail body<BR> Dim cdoSubject &#039form subject line<BR> Dim rfFirstName &#039form first name<BR> Dim rfLastName &#039form last name<BR> Dim rfEmailAddy &#039form Email<BR> Dim rfICQNum &#039form ICQ<BR> Dim rfURL &#039form URL<BR> Dim rfCity &#039form City<BR> Dim rfState &#039form State<BR> Dim rfComments &#039form comments<BR> <BR> &#039Define above variable list<BR> rfFirstName = Request.Form("cfFirstName")<BR> rfLastName = Request.Form("cfLastName")<BR> rfEmailAddy = Request.Form("cfEmailAddy")<BR> rfICQNum = Request.Form("cfICQNum")<BR> rfURL = Request.Form("cfURL")<BR> rfCity = Request.Form("cfCity")<BR> rfState = Request.Form("cfState")<BR> rfComments = Request.Form("cfBigComments")<BR> <BR> &#039define email variables<BR> cdoFrom = rfEmailAddy<BR> cdoTo = "webmaster@yoursite.com"<BR> cdoBody = "A new submission to the Contact Form" & VbCrLf & VbCrLf <BR> cdoSubject = "Contact Form"<BR> cdoAppend = rfFirstName & " "<BR> cdoAppend = cdoAppend & rfLastName & VbCrLf & VbCrLf<BR> cdoAppend = cdoAppend & rfEmailAddy & VbCrLf & VbCrLf<BR> cdoAppend = cdoAppend & rfICQNum & VbCrLf & VbCrLf<BR> cdoAppend = cdoAppend & rfURL & VbCrLf & VbCrLf<BR> cdoAppend = cdoAppend & rfCity & VbCrLf & VbCrLf<BR> cdoAppend = cdoAppend & rfState & VbCrLf & VbCrLf<BR> cdoAppend = cdoAppend & rfComments & VbCrLf<BR> <BR> &#039create email object and send it<BR> Set cdoContact = Server.CreateObject("CDONTS.Newmail")<BR> With cdoContact<BR> .From = cdoFrom<BR> .To = cdoTo<BR> .Subject = cdoSubject<BR> .Body = cdoBody & cdoAppend<BR> .Send<BR> End With<BR> Set cdoContact = Nothing

Posting Permissions

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