quick help with form-to-email

This is a discussion on "quick help with form-to-email" within the Starting Out section. This forum, and the thread "quick help with form-to-email 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 Jul 22nd, 2007, 11:30
New Member
Join Date: Jul 2007
Location: England
Age: 20
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
quick help with form-to-email

Hi,

I wanted to make a contact page for my website, so i had a look on google and saw lots about a form-to-email type thing (lol).

I had a quick read on it, and i found a basic one that is free to use. I had a try and it looks nice and all, but it doesnt actually sent to my email. I think i know why, but i dont know how to fix it...

The code is:

Code: Select all
<form action="#">
          <p>Below is an example of how it would look:<br /><br /></p>
          <div class="row">
            <span class="formlabel">your name</span>
            <span class="forminput"><input type="text" name="yourname" /></span>
          </div>
          <div class="row">
            <span class="formlabel">your email address</span>
            <span class="forminput"><input type="text" name="youremail" /></span>
          </div>
          <div class="row">
            <span class="formlabel">your enquiry</span>
            <span class="forminput"><textarea rows="5" cols="18" name="yourenquiry" class="textarea"></textarea></span>
          </div>
          <div class="spacer">&nbsp;</div>
          <div class="row">
            <span class="formlabel"></span>
            <span class="forminput"><input type="submit" value="submit" class="submit" /></span>
          </div>
          <p><br /><br />NOTE: A contact form such as this would require some way of emailing the input to a specified email address.</p>
        </form>
Now, do i need to do something with the "<form action="#">" part?

Any help would be great,
Thanks.
Reply With Quote

  #2 (permalink)  
Old Jul 22nd, 2007, 11:54
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: quick help with form-to-email

Quote:
<p><br /><br />NOTE: A contact form such as this would require some way of emailing the input to a specified email address.</p>
So the form you've added isn't actually set up to send email...it is just a form!

There are two ways:

Use the mailto: function...
HTML: Select all
<form action="mailto:youremailaddresshere">
This way, you will get sent the data they have enetered into the form, however, the user will get no feedback on their submission. They will not get a thank you email, or directed to a thank you page. in fact they will have no way of telling if their form has been submitted or not.

The second way is using PHP.You can do this if you have PHP enabled on your hosting package. Using PHO you can do al sorts of nifty things. You can have the details emailed to you in a format you set, you can send a personalised thank you email to the user once they have submitted the form. You can add validation to check they are inputting a proper email address etc., you can redirect them to a thank you page once they have submitted their data...there is all sorts of things you can do. PHP is definitely the way to go if you can. Search google for tutorials for sending mail or contact forms in PHP. you should find loads of useful resources.

Mike
Reply With Quote
  #3 (permalink)  
Old Jul 22nd, 2007, 13:51
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: quick help with form-to-email

Quote:
Using PHO you can do al sorts of nifty things.
I'm not familiar with PHO, you'll have to fill me in.

What Mike said, plus...

Contact forms using PHP are pretty simple but make sure you have some kind of security on it. Those dratted spam bots get cleverer all the time, though simply by using a form to send email you're enhancing security.


Pete.
Reply With Quote
  #4 (permalink)  
Old Jul 22nd, 2007, 14:01
1840dsgn's Avatar
SuperMember

SuperMember
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 723
Thanks: 0
Thanked 0 Times in 0 Posts
Re: quick help with form-to-email

Quote:
I'm not familiar with PHO, you'll have to fill me in.
Lol its my version of PHP...bodged but works! I'm still learning although I've managed to put together a CMS and blog and a booking and stock system...so I'm learning well!

Yea it is true, there are a lot of ways you can add security with PHP, very few on a mailto form, none without using javascript, so if the user has JS disabled there is no validation or security.

On my forms I have a security question at the end, similar to the captcha ones (the random array of letters and numbers you have to retype when filling in forms). My system generates 2 random numbers like one and seven and asks a question like what is randomnum1 plus randomnum2? and the user has to type the answer. The validation then checks whether the answer was correct or not.

Spambots are clever, but they're not as clever as humans and therefore can't read the worded numbers and answer in numeric digits...as far as I know!
Reply With Quote
Reply

Tags
email form

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
Quick form question Accurax Web Page Design 7 Jun 2nd, 2007 09:57
Help Me With My Email Form Please bruno89 Web Page Design 6 May 2nd, 2006 12:40
HELP ME! Email form bruno89 Web Page Design 2 Apr 25th, 2006 17:42


All times are GMT. The time now is 07:59.


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