I need the Code to send forms

  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

ALL,

I have built a form using Dreamweaver8, but now I need the code to send it to the desired email address. Is there a thread already on this subject? Is there a solid easy to follow tutorial out there?
Can I find this in Dreamweaver behaviors or pre-codes? Or do someone simply know the code, where to place (very important), and any other steps to complete this task?

Thank you in adavance,

cgfX
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • seularts
  • Graduate
  • Graduate
  • User avatar
  • Posts: 153
  • Loc: Romania

Post 3+ Months Ago

considering you action from the form sends to, let's say, feedback.php, just add the folowing code in feedback.php

considering, lets say, you have the input names called "name" and "email" and the textarea named "text" in your form:
Code: [ Select ]
$name=$_POST['name'];
$email=$_POST['email'];
$text=$_POST['text'];

mail( "yourmail@xxx.xxx", "Name: $name", $text, "From: $mail" );
  1. $name=$_POST['name'];
  2. $email=$_POST['email'];
  3. $text=$_POST['text'];
  4. mail( "yourmail@xxx.xxx", "Name: $name", $text, "From: $mail" );
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Seul Arts,

Thank you very much, I believe this is what I need.

cgfX
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8399
  • Loc: USA

Post 3+ Months Ago

Most hosts don't allow the mail function so if your host doesn't allow that, you would need to find an SMTP alternative.
  • CGFX
  • Graduate
  • Graduate
  • User avatar
  • Posts: 161
  • Loc: Chicago, IL.

Post 3+ Months Ago

Thanks Bogey,

Actually I am with GoDaddy for hosting. GoDaddy has a form mail that writes a gdform.asp that sends the submits to a email address of your picking. I believe in Dreamweaver I will have to place gdform.asp into "actions" and that's it, I think.

cgfX
  • bobboken
  • Novice
  • Novice
  • User avatar
  • Posts: 16

Post 3+ Months Ago

If you want to send emails to users, you should change code like this:

$name=$_POST['name'];
$email=$_POST['email'];
$text=$_POST['text'];

$headers = "From: XXXX < XXXX@XXXX.com>\r\n";
$headers .= "X-Sender: <XXXX@XXXX.com>\r\n";
$headers .= "X-Mailer: PHP\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Return-Path: <".$SERVER_ADDR.">\r\n";

mail( "yourmail@xxx.xxx", "Name: $name", $text, $headers );

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 69 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.