Email form in Dreamweaver

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


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 2nd, 2007, 08:39
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Email form in Dreamweaver

Hi,

I am a 2D graphic designer who is starting to dabble in web design (in Dreamweaver) for friends, trying to set up a booking form that can be emailed to one recipient... having followed all the tutorials I could find, when I test the form and press SUBMIT button, all that happens is my email browser opens.... I am not using any PSP coding or anything. What do I need to do to ensure the form works correctly?

I am completely tech jargon blind, so the simpler the reply in everyday language the better.

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 2nd, 2007, 12:12
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email form in Dreamweaver

Find out if your webhost has cgi formmail installed. If they do, then ask them if they have a help file on how to set that up. It's the easiest way to send info through a form.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 2nd, 2007, 15:54
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Email form in Dreamweaver

Yeah, or you could use PHP, if they have that installed...that is also pretty simple.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Mar 7th, 2007, 11:21
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Dreamweaver forms

Hi, thanks all for your replies regarding email forms in dreamweaver - i am almost there now BUT have learnt that Dreamweaver needs additional extensions added to enable information from a form to be emailed... is this correct and if so, what extention is best for me to download and add?

Cheers

Julian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Mar 7th, 2007, 12:07
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

The preferred method for sending information from a form to an email is to use a server side language like PHP or ASP (.NET) or Perl. Here's a PHP Contact Script that I've used quite often.

The other unsafe way is to simple put your email address in the action

Code: Select all
<form action="mailto:email@domain.com" method="post">...</form>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Mar 7th, 2007, 12:45
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

thanks for this... I had used php but obviously there is something wrong in the coding. Thanks for the code pages also.... I may be being stupid, as i do not read code very well (being a designer I tend to gloss over the small print) so are these three pages generically linked to each other already or do I have to do that... I have a form page created, can I simply cut and paste over your form, so long as I add our email address at the bottom of the coding?

Cheers

Julian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Mar 7th, 2007, 12:48
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

You should be able to just copy/paste those and name them like the tutorial named them and it should work. Just read through the instructions. It should explain the whole thing.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Mar 7th, 2007, 15:16
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

Hi...

have uploadd my form, but on sumbitting I get an error report on a certain line on the contact.php page.... line is :

<?php }>

is this correct?

Cheers

Julian
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Mar 7th, 2007, 15:32
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

can you give the whole code and the error please?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Mar 7th, 2007, 15:48
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

error report is

PHP Parse error: syntax error, unexpected '}' in F:\hshome\darlingt\darlingtonoperaticsociety.org.u k\Protected area\contact.php on line 121

have attached the page (re-saved as .htm so I can attach here)

hope this helps

Julian
Attached Files
File Type: htm contact.htm (6.1 KB, 39 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Mar 7th, 2007, 15:52
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

I don't see anything in the code that you need to close with the } I don't thing you don't need it at all ... remove it and see if that works.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Mar 7th, 2007, 15:56
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

done that, and it at least gets me back to the booking form... but now, when I press submit the following error occure... should I attach all 3 pages for you to check?

PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at F:\hshome\darlingt\darlingtonoperaticsociety.org.u k\Protected area\contact.php:1) in F:\hshome\darlingt\darlingtonoperaticsociety.org.u k\Protected area\contact.php on line 1

there is more 'red' coding on top 2 lines of the original contact.php but on lines where you say DO NOT REMOVE THESE LINES
Attached Files
File Type: htm thank_you.htm (2.3 KB, 34 views)
File Type: htm config.htm (1.3 KB, 35 views)
File Type: htm contact.htm (6.1 KB, 36 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Mar 7th, 2007, 15:58
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

From thank_you.php and contact.php, remove

Code: Select all
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
You don't need it anyways. IE doesn't like it.

In config.php, remove
Code: Select all
<title>darlingtonos config.php</title>
You need to copy the code as is! Those things aren't in the original code posted in Joe's tutorials.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Mar 7th, 2007, 16:07
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

OK... done both of those and error reports now disappeared... but form does not post - page just sits there as if pressing submit does not register anything
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Mar 7th, 2007, 16:10
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

Code: Select all
<form action="Joe2Torials%20Contact%20Form/prebookingform.php"
In your contact.php page you need to send the action to the thank_you.php

Code: Select all
<form action="Joe2Torials%20Contact%20Form/thank_you.php"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Mar 7th, 2007, 16:20
Junior Member
Join Date: Mar 2007
Location: UK
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

OK... have different error reports now, have to shoot off but will pick this back up tomorrow if that is ok...many thanks for your help so far

these are errors getting now

PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at F:\hshome\darlingt\darlingtonoperaticsociety.org.u k\Protected area\thank_you.php:1) in F:\hshome\darlingt\darlingtonoperaticsociety.org.u k\Protected area\thank_you.php on line 1 PHP Warning: Cannot modify header information - headers already sent by (output started at F:\hshome\darlingt\darlingtonoperaticsociety.org.u k\Protected area\thank_you.php:1) in F:\hshome\darlingt\darlingtonoperaticsociety.org.u k\Protected area\thank_you.php on line 24
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Mar 7th, 2007, 16:39
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

What do your pages look like now? Could you attach them?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18  
Old Mar 7th, 2007, 19:37
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

Or you could give us a link...lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #19  
Old Mar 8th, 2007, 01:02
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms

well ... considering we're dealing with PHP, giving us a link won't make a lick of difference since we won't get to see the PHP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #20  
Old Mar 8th, 2007, 03:33
Elite Veteran
Join Date: Dec 2005
Location: On Internet
Posts: 4,859
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Dreamweaver forms