Fill out online form send by e-mail

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.
starviewAsked:
Who is Participating?
 
Timothy GoldenWeb DevCommented:
does your host support PHP or ASP or CGI or any type of porgamming means?
0
 
starviewAuthor Commented:
yes php and cgi
0
 
Timothy GoldenWeb DevCommented:
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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
starviewAuthor Commented:
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
 
Timothy GoldenWeb DevCommented:
you will have to format the  part
$mail->Body   = " YOUR HTML HERE";

with your HTML

post your HTML code for the form
0
 
starviewAuthor Commented:
I can post the HTML codes there, but will it pick up what the user has enter in the codes?
0
 
Timothy GoldenWeb DevCommented:
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
 
ApyrealCommented:
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
 
starviewAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.