Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Fill out online form send by e-mail

Posted on 2005-05-05
9
Medium Priority
?
598 Views
Last Modified: 2010-04-09
Maybe someone can help me with this problem.

I have a html form that can be fill out on line.

I want to be able to have this form sent to me by email.

The complete form the way it looks on the web site after it is fill out.

Not just the data part. I know how to do that part.
0
Comment
Question by:starview
  • 4
  • 4
9 Comments
 
LVL 3

Accepted Solution

by:
Timothy Golden earned 1200 total points
ID: 13941549
does your host support PHP or ASP or CGI or any type of porgamming means?
0
 

Author Comment

by:starview
ID: 13941571
yes php and cgi
0
 
LVL 3

Expert Comment

by:Timothy Golden
ID: 13941650
ok so you can use PHP tp post the page to a 'prosessing script' that will collect the data and send it to an email address,

There are MANY packages that will do this or you can write your own
One of the best for both text an html formated emails.
http://phpmailer.sourceforge.net/ 

This class is very easy to set up and use and offers alot of flexibility.

To use the mailer you would make your html form then post it to a processing page:

save this as your form.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
      <title>My Form</title>
</head>
<body>
<form name="myForm" action="process.php" method="post">
<input name="name" size="10" />Name
<input name="email" size="10" />Email
<input type="Submit" value="Submit" />
</form>
</body>
</html>


***********
 save this as process.php
<?
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->WordWrap = 50;
$mail->IsHTML(true);

/*email connections*/
$mail->IsSMTP();                                            // set mailer to use SMTP
$mail->Host = "mail.yoursite.com;216.153.1.1";                   // specify main and backup server
$mail->SMTPAuth = true;                                         // turn on SMTP authentication
$mail->Username = "myvailduser";                                // SMTP username
$mail->Password = "123456";                               // SMTP password
$mail->From = "me@mysite.com";                        // from user
$mail->FromName = "Bob Smith";                  // from name
$mail->WordWrap = 50;                                          // word wrap
$mail->IsHTML(true);                                          //set to html

//send mail to bob@mysite.com
$mail->AddAddress("bob@mysite.com", "Bob smith");
$mail->AddReplyTo("bob@mysite.com", "Bob smith");

// sned a BCC to submitter
$mail->AddBCC("$email", "$name");

//sublect
$mail->Subject = "Test Email";

//HTML VERSION
$mail->Body   = "
This is the <b>html version</b><br>
Please visit <a href=\"http://www.nhwebgroup.com\">www.nhwebgroup.com</a>
<br>
Thanks<br>
<a href=\"http://www.nhwebgroup.com\">www.nhwebgroup.com</a>
";

//TEXT ONLY
$mail->AltBody = "
This is the text version
Please visit www.nhwebgroup.com

Thanks
www.nhwebgroup.com
";
if(!$mail->Send())
{
   echo "Message could not be sent. <p>";
   echo "Mailer Error: " . $mail->ErrorInfo;
   exit;
} else {
      echo"<h1>Your Mail is sent</h1>";
}

?>

make sure you change the mailer settinngs AND download the phpmailer class and save the class.phpmailer.php and other related class.phpmailer.php file sin the same directory
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:starview
ID: 13941701
Before I do all this I have a question.
Will this send the fill out form as it looks on the web site.
or will it just send the data of the form?
0
 
LVL 3

Expert Comment

by:Timothy Golden
ID: 13941879
you will have to format the  part
$mail->Body   = " YOUR HTML HERE";

with your HTML

post your HTML code for the form
0
 

Author Comment

by:starview
ID: 13942077
I can post the HTML codes there, but will it pick up what the user has enter in the codes?
0
 
LVL 3

Expert Comment

by:Timothy Golden
ID: 13943806
posting your HTML code here will allow one of the "experts" to take your code and convert it into the format that you would need to use it with the mailer class.

then the expert will post the new changed code bach here for you to save on your website.
0
 
LVL 1

Assisted Solution

by:Apyreal
Apyreal earned 800 total points
ID: 13944302
you can just make the html dynamic by using the php code. emails can be sent as html, so all you have to do is write out the html code when you send the email. Make sure you specify that you are sending the email as html. It is one of the properties of the mail object you will use.
0
 

Author Comment

by:starview
ID: 13944962
I have tried using this in the process.php and all it does is send the form and not the information that has been entered I need both. This is just the codes not the one I have in the form.html, the differents is the <form name="myForm" action="process.php" method="post"> and <input type="Submit" value="Submit" /> have been taken out.
Here is the HTML codes:


<HTML><HEAD><TITLE>OPEN DANCE LISTING FORM</TITLE>
</HEAD>
<BODY>
<P align=center><FONT size=4>OPEN DANCE LISTING FORM</FONT></P>
<P align=center><I><U>You can print out this form, fill it out and return to the
DANCE LISTING EDITOR</U></I></P>
<P align=center><FONT size=3><I>Use one form per month only&nbsp;&nbsp;&nbsp;
</I></FONT></P>
<DIV align=center>
<CENTER>
<TABLE width="69%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Must be received by the 25th of the month-Two months
      before the event</TD></TR></TBODY></TABLE></CENTER></DIV>
<center><b><FONT size=4>Fill in Box with the appropriate information below</b></FONT></center>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="33%">ROUNDUP issue:<input type=text MAXLENGTH=45 size=45 value=""></TD>
    <TD width="49%">Club Name:<input type=text MAXLENGTH=62 size=62  value=""></TD>
    <TD width="18%">Region:<input type=text  MAXLENGTH=14 size=14  value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<center><b><FONT size=4>Check the appropriate items below</b></FONT></center>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="12%">Day of the week</TD>
    <TD width="12%">
      <P align=center>Sunday<input type=checkbox value=""></P></TD>
    <TD width="12%">
      <P align=center>Monday<input type=checkbox size=1 value=""></P></TD>
    <TD width="12%">
      <P align=center>Tuesday<input type=checkbox size=1 value=""></P></TD>
    <TD width="13%">
      <P align=center>Wednesday<input type=checkbox size=1 value=""></P></TD></CENTER>
    <TD width="13%">
      <P align=center>Thursday<input type=checkbox size=1 value=""></P></TD>
    <CENTER>
    <TD width="13%">
      <P align=center>Friday<input type=checkbox size=1 value=""></P></TD>
    <TD width="13%">
      <P align=center>Saturday<input type=checkbox size=1 value=""></P></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="14%">Week(s) of the month</TD>
    <TD width="14%">
      <P align=center>1<input type=checkbox size=1 value=""></P></TD>
    <TD width="14%">
      <P align=center>2<input type=checkbox size=1 value=""></P></TD>
    <TD width="14%">
      <P align=center>3<input type=checkbox size=1 value=""></P></TD>
    <TD width="14%">
      <P align=center>4<input type=checkbox size=1 value=""></P></TD>
    <TD width="15%">
      <P align=center>5<input type=checkbox size=1 value=""></P></TD>
    <TD width="15%">
      <P align=center>Every<input type=checkbox size=1 value=""></P></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>

    <TD width="8%">Dance Level</TD>
    <TD width="8%">
      <P align=center>ND<input type=checkbox size=1 value=""></P></TD>
    <TD width="8%">
      <P align=center>MS<input type=checkbox size=1 value=""></P></TD>
    <TD width="8%">
      <P align=center>Plus<input type=checkbox size=1 value=""></P></TD>
    <TD width="8%">
      <P align=center>A1<input type=checkbox size=1 value=""></P></TD>
    <TD width="8%">
      <P align=center>A2<input type=checkbox size=1 value=""></P></TD>
    <TD width="8%">
      <P align=center>C1<input type=checkbox size=1 value=""></P></TD>
    <TD width="8%">
      <P align=center>C2<input type=checkbox size=1 value=""></P></TD>
    <TD width="9%">
      <P align=center>RD<input type=checkbox size=1 value=""></P></TD>
    <TD width="9%">
      <P align=center>CW<input type=checkbox size=3 value=""></P></TD>
    <TD width="9%">
      <P align=center>Folk<input type=checkbox size=1 value=""></P></TD>
    <TD width="9%">
      <P align=center>Clogging<input type=checkbox size=1 value=""></P></TD></TR></TBODY></TABLE></CENTER></DIV>

<DIV align=center>
<CENTER>
<center><b><FONT size=4>Fill in Box with the appropriate information below</b></FONT></center>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="33%">First Week<input type=text  MAXLENGTH=30 size=30 value=""></TD>
    <TD width="33%">Date:<input type=text  MAXLENGTH=40 size=40 value=""></TD>
    <TD width="34%">Dance Level:<input type=text  MAXLENGTH=35 size=35 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Facility:<input type=text  MAXLENGTH=145 size=145 value=""></TD></TR>
  <TR>
    <TD width="100%">City/State:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR>
  <TR>
    <TD width="100%">Address:<input type=text  MAXLENGTH=144 size=144 value=""></TD></TR>
  <TR>
    <TD width="100%">Directions:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="50%">RD Cuer:<input type=text  MAXLENGTH=63 size=63 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">SD Caller:<input type=text  MAXLENGTH=62 size=62 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">Workshop:<input type=text  MAXLENGTH=61 size=61 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Theme-Food:<input type=text  MAXLENGTH=138 size=138 value=""></TD></TR>
  <TR>
    <TD width="100%">Contact Info:<input type=text  MAXLENGTH=139 size=139 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<br>
<DIV align=center>
<CENTER>
<center><b><FONT size=4>Fill in Box with the appropriate information below</b></FONT></center>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="33%">Second Week<input type=text  MAXLENGTH=30 size=30 value=""></TD>
    <TD width="33%">Date:<input type=text  MAXLENGTH=40 size=40 value=""></TD>
    <TD width="34%">Dance Level:<input type=text  MAXLENGTH=35 size=35 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Facility:<input type=text  MAXLENGTH=145 size=145 value=""></TD></TR>
  <TR>
    <TD width="100%">City/State:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR>
  <TR>
    <TD width="100%">Address:<input type=text  MAXLENGTH=144 size=144 value=""></TD></TR>
  <TR>
    <TD width="100%">Directions:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="50%">RD Cuer:<input type=text  MAXLENGTH=63 size=63 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">SD Caller:<input type=text  MAXLENGTH=62 size=62 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">Workshop:<input type=text  MAXLENGTH=61 size=61 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Theme-Food:<input type=text  MAXLENGTH=138 size=138 value=""></TD></TR>
  <TR>
    <TD width="100%">Contact Info:<input type=text  MAXLENGTH=139 size=139 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<br>
<DIV align=center>
<CENTER>
<center><b><FONT size=4>Fill in Box with the appropriate information below</b></FONT></center>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="33%">Third Week<input type=text  MAXLENGTH=30 size=30 value=""></TD>
    <TD width="33%">Date:<input type=text  MAXLENGTH=40 size=40 value=""></TD>
    <TD width="34%">Dance Level:<input type=text  MAXLENGTH=35 size=35 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Facility:<input type=text  MAXLENGTH=145 size=145 value=""></TD></TR>
  <TR>
    <TD width="100%">City/State:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR>
  <TR>
    <TD width="100%">Address:<input type=text  MAXLENGTH=144 size=144 value=""></TD></TR>
  <TR>
    <TD width="100%">Directions:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="50%">RD Cuer:<input type=text  MAXLENGTH=63 size=63 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">SD Caller:<input type=text  MAXLENGTH=62 size=62 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">Workshop:<input type=text  MAXLENGTH=61 size=61 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Theme-Food:<input type=text  MAXLENGTH=138 size=138 value=""></TD></TR>
  <TR>
    <TD width="100%">Contact Info:<input type=text  MAXLENGTH=139 size=139 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<br>
<DIV align=center>
<CENTER>
<center><b><FONT size=4>Fill in Box with the appropriate information below</b></FONT></center>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="33%">Fourth Week<input type=text  MAXLENGTH=30 size=30 value=""></TD>
    <TD width="33%">Date:<input type=text  MAXLENGTH=40 size=40 value=""></TD>
    <TD width="34%">Dance Level:<input type=text  MAXLENGTH=35 size=35 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Facility:<input type=text  MAXLENGTH=145 size=145 value=""></TD></TR>
  <TR>
    <TD width="100%">City/State:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR>
  <TR>
    <TD width="100%">Address:<input type=text  MAXLENGTH=144 size=144 value=""></TD></TR>
  <TR>
    <TD width="100%">Directions:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="50%">RD Cuer:<input type=text  MAXLENGTH=63 size=63 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">SD Caller:<input type=text  MAXLENGTH=62 size=62 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">Workshop:<input type=text  MAXLENGTH=61 size=61 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Theme-Food:<input type=text  MAXLENGTH=138 size=138 value=""></TD></TR>
  <TR>
    <TD width="100%">Contact Info:<input type=text  MAXLENGTH=139 size=139 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<br>
<DIV align=center>
<CENTER>
<center><b><FONT size=4>Fill in Box with the appropriate information below</b></FONT></center>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="33%">Fifth Week<input type=text  MAXLENGTH=30 size=30 value=""></TD>
    <TD width="33%">Date:<input type=text  MAXLENGTH=40 size=40 value=""></TD>
    <TD width="34%">Dance Level:<input type=text  MAXLENGTH=35 size=35 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Facility:<input type=text  MAXLENGTH=145 size=145 value=""></TD></TR>
  <TR>
    <TD width="100%">City/State:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR>
  <TR>
    <TD width="100%">Address:<input type=text  MAXLENGTH=144 size=144 value=""></TD></TR>
  <TR>
    <TD width="100%">Directions:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="50%">RD Cuer:<input type=text  MAXLENGTH=63 size=63 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">SD Caller:<input type=text  MAXLENGTH=62 size=62 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR>
  <TR>
    <TD width="50%">Workshop:<input type=text  MAXLENGTH=61 size=61 value=""></TD>
    <TD width="50%">Time:<input type=text  MAXLENGTH=67 size=67 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Theme-Food:<input type=text  MAXLENGTH=138 size=138 value=""></TD></TR>
  <TR>
    <TD width="100%">Contact Info:<input type=text  MAXLENGTH=139 size=139 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<br>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">
      <P align=center>Send this completed form to the current DANCE LISTING
      EDITOR</P></TD></TR></TBODY></TABLE></CENTER></DIV>
<DIV align=center>
<CENTER>
<TABLE width="100%" border=2>
  <TBODY>
  <TR>
    <TD width="100%">Date Sent:<input type=text  MAXLENGTH=142 size=142 value=""></TD></TR>
  <TR>
    <TD width="100%">Name/Club Position:<input type=text  MAXLENGTH=132 size=132 value=""></TD></TR>
  <TR>
    <TD width="100%">Street Address:<input type=text  MAXLENGTH=144 size=144 value=""></TD></TR>
  <TR>
    <TD width="100%">City/Sate/Zip:<input type=text  MAXLENGTH=139 size=139 value=""></TD></TR>
  <TR>
    <TD width="100%">Phone Number with Area Code:<input type=text  MAXLENGTH=120 size=120 value=""></TD></TR>
  <TR>
    <TD width="100%">Email Address:<input name=email type=text  MAXLENGTH=138 size=138 value=""></TD></TR></TBODY></TABLE></CENTER></DIV>
<P>&nbsp;</P>
</form>
</BODY></HTML>
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question