Simple Contact Form Script?

I am a FrontPage user that has switched to Dreamweaver. I have over 40 client sites. Once I leave Dreamweaver, I'll need new contact forms on the sites (since I won't be using the FrontPage extensions for the contact forms). My host uses formmail (which looks really confusing). But, I want to be sure I am using a script that I can use with my current host (IXwebhosting) or any other host I may go to in the future. In other words, if I ever want to move to a new server or host, I don't want to have to worry about redoing all 40 contact forms again.

I need each form I put on my sites to to be able to have a specfic subject line and be sent to a specific email address.

You can see one of my current forms at:

I am a novice at (non-FrontPage) contact forms. Be gentle and talk to me like I'm a first grader :)
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

serjikConnect With a Mentor Commented:
There is simple mail function in php which works fine on mostly servers.
Save it with any filename but with .php extension like form.php and just try.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
if (isset($_POST['submit'])) {
  $to = 'email@to.send';
  $from = $_POST['email']; 
  $subj = '[Mail Subject]';
  $body = ' Email Art:
Your Name:
' .$_POST['realname'] . '
' .$_POST['email'] . '
' .$_POST['company'] . '
' .$_POST['title'] . '
' .$_POST['location'] . '
Phone Number:
' .$_POST['phone'] . '
' .$_POST['comments'];
  // ---- mail function start
  function xmail($to,$from,$subj,$body) { 
    $boundary = md5(uniqid(time(),1)); 
    $add_header ="MIME-Version: 1.0\r\nContent-Type: multipart/mixed; boundary=\"$boundary\"";
    $mail_content = "--".$boundary."\r\n"
    ."Content-Type: text/plain; charset=utf-8; format=flowed\r\n"
    ."Content-Transfer-Encoding: 8bit\r\n\r\n"
    return mail($to,$subj,$mail_content,"From:".$from."\r\n".$add_header);
// ---- mail function end
<form method="POST" action="">
  <p>Email Art:</p>
  <table border="0" cellpadding="2" cellspacing="0">
      <td>Your Name: </td>
      <td><input type="text" name="realname" size=40></td>
      <td>Email: </td>
      <td><input type="text" name="email" size=40></td>
      <td>Company: </td>
      <td><input type="text" name="company" size=40></td>
      <td>Title: </td>
      <td><input type="text" name="title" size=40></td>
      <td>Location: </td>
      <td><input type="text" name="location" size=40></td>
      <td>Phone Number: </td>
      <td><input type="text" name="phone" size=40></td>
      <td valign="top">Comment/Question: </td>
      <td><textarea rows="4" cols="40" name="comments"></textarea>
      <td colspan="2" align="right"> <input type="submit" value="Click to Send"></td>

Open in new window

>> In other words, if I ever want to move to a new server or host,
It depends.  For example, if you use JMail (an ASP component) ( to email the information, then you would want to locate a hosting company that supports JMail.  Most of them do as well as CDOSYS, ASPMail, ASPEMail.  

Formmail does not give us much unfortunately.  I have an olf "processing" form on one site that uses JMail, but the form name is formmail.asp.  But if you are referring to - I have never used that one before.  I heard there were some security issues with it.  It looks like it is a PERL script, so you would make sure that you find a hosting company that supports PERL and that script.  

All Courses

From novice to tech pro — start learning today.