email forms

This is a discussion on "email forms" within the Starting Out section. This forum, and the thread "email forms are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Starting Out

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 17th, 2007, 20:59
New Member
Join Date: Jan 2007
Location: Southampton, uk
Age: 24
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
email forms

I have a form that asks for information such as, name, email address, and messsage.

When the user clicks submit i want the information to be sent to me in the form of an email, i know i need to use php or asp or something, but i don't know any coding.

I am using dreamweaver to make the form.

any help would be much appreciated
Reply With Quote

  #2 (permalink)  
Old Jan 17th, 2007, 21:14
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,950
Blog Entries: 7
Thanks: 7
Thanked 3 Times in 3 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: email forms

This is for ASP. Point the action attribute of your form to 'emaildo.asp', then use code similar to the following (edit for your needs), and save as emaildo.asp
Code: Select all
<%
EmailFrom = "me@blah.com"
EmailTo = "you@server.com"
Subject = "subject here"
name = Trim(Request.Form("name"))
Message = Trim(Request.Form("Message"))

Body = "name: " & name & VbCrLf
Body = Body & "Message: " & Message & VbCrLf

' send email
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send

' redirect to success page
Response.Redirect("done.htm")%>
Of course, there is no input validation above, but it should at least get you started.

The above will send you an email, then redirect the user to done.htm
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #3 (permalink)  
Old Jan 17th, 2007, 21:20
New Member
Join Date: Jan 2007
Location: Southampton, uk
Age: 24
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: email forms

Thankyou very much, i will try it now
Reply With Quote
  #4 (permalink)  
Old Jan 17th, 2007, 21:58
New Member
Join Date: Jan 2007
Location: Southampton, uk
Age: 24
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: email forms

it's all working fine. thankyou again
Reply With Quote
Reply

Tags
email, forms

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP email form not sending email Kurt PHP Forum 1 Oct 12th, 2007 04:26
Form submits to email via php, but email is blank!!?? DH1234 PHP Forum 2 Jun 18th, 2007 10:42
Email forms in dreamweaver schwell Web Page Design 9 Feb 11th, 2007 02:14
forms atomicant_2005 JavaScript Forum 15 Dec 9th, 2005 16:09
flash php email forms xeno Flash & Multimedia Forum 1 Jul 31st, 2005 22:36


All times are GMT. The time now is 12:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43