Solved

Form Fields not working....

Posted on 2011-03-20
12
475 Views
Last Modified: 2013-12-08
Hello,
I have two problems with this site:
I have a contact form that was working correctly, however, some of the fields have stopped working. The only fields that come through are the email and the comments field, none of the others come through. I'm puzzled by this.

The other has to do with code validation...I can't find the correlation between W3C output validation errors and my HTML code.

If I include the code and the W3C validation errors, can someone help me connect the dots, so to speak and swap out faulty code with clean code?

Also, I don't know JavaScript. Dreamweaver wrote the the code for the JavaScript. I have no idea how to correct this.
1. Error Line 56, Column 76: character ";" not allowed in attribute specification list

      …  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

      ¿
   2. Error Line 56, Column 76: element "a.length" undefined

      …  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

      ¿

      You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:
          * incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element),
          * by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
          * by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).
   3. Error Line 59, Column 9: end tag for "a.length" omitted, but OMITTAG NO was specified

      </script>

      ¿

      You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
   4. Info Line 56, Column 67: start tag was here

      …  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

   5. Error Line 158, Column 285: end tag for "br" omitted, but OMITTAG NO was specified

      …ref="serviceRequest.html">Service Request</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>

      ¿

      You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
   6. Info Line 158, Column 281: start tag was here

      …ref="serviceRequest.html">Service Request</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>

Open in new window

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>DK meters generators analyzers - vidTektronixeo service, Santa clara, CA</title>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<meta name="description" 
    content="Tektronix Repair and Calibration,TSG Generators, VM700A, VM700T,1705, 1705A, 1720, 1730,1740A, 1750A, 1760, 1765,
WFM90, WFM601, WFM601A, WFM601i, WFM601M, 1780R. Authorized DK-Technologies Service Center. " />

<meta name="keywords" 
    content="Tektronix Repair and Calibration,TSG Generators, VM700A, VM700T,1705, 1705A, 1720, 1730,1740A, 1750A, 1760, 1765,
WFM90, WFM601, WFM601A, WFM601i, WFM601M, 1780R. Authorized DK-Technologies Service Center." />
<!--[if lte IE 7]>
<style>
.content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */
ul.nav a { zoom: 1; }  /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */
</style>
<!--[if IE]>
<style type="text/css"> 
a { zoom: 1;}
</style>
<![endif]-->

<![endif]-->
<style type="text/css">
h1,h2,h3,h4,h5,h6 {
	font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}
h1 {
	font-size: 45px;
	color: #83A16B;
}
h2 {
	font-size: 35px;
	color: #83A16B;
}
h3 {
	font-size: 20px;
	color: #FFF;
}
h4 {
	font-size: 16px;
	color: #A1AA80;
}
h5 {
	font-size: 14px;
	color: #A1AA80;
}
h6 {
	font-size: 12px;
	color: #A1AA80;
}
</style>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
</script>
<meta name="google-site-verification" content="u2pDknYQBnZhwDs1g_cWmkWbjIkbrcWRPXvdJ9gK4sM" />
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="menu/menu_style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21405189-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>

<body>


<div class="container">
  <div class="header">
    <ul id="menu">
   <li><a href="index.html" target="_self">Home</a></li>
   <li><a href="services.html" target="_self">Services</a></li>
   <li><a href="serviceRequest.html" target="_self">Service Request</a></li>
</ul>
    <h1><br />
    VMSTEK</h1><br />
    <h3><br />
      2100 Walsh Avenue<br />
Suite B
  <br />
  Santa Clara, CA 95050</h3>

  <!-- end .header --></div>
 <div class="sidebar1">
<p>Recalibration <br />
    and Repairs</p><br />
    <img src="images/side_logo.png" alt="VMSTEK logo. Video Measurement Service. Recalibration, Repair, Consultant." width="250" height="450" align="bottom" />
  <!-- end .sidebar1 --></div>
  <div class="content">
    <h2>Video Measurement Service<br />
    </h2>
    <h4>Service Experts for DK-Technologies Professional Products
      <br />
    & Tektronix® Legacy Broadcast Products</h4>
    <h4>Please call or email us for quotes or general inquiry.<br />
    </h4>
    <form id="frmContact" name="frmContact" method="post" action="contact_process.php">
      <p>
        <label for="first_name">First Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="first_name" type="text" id="first_name"tabindex="10" size="35" />
      </p>
      <p>
        <label for="last_name">Last Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="last_name" type="text" id="last_name" tabindex="20" size="35" />
      </p>
      <p>
        <label for="company_name">Company Name:</label>
        <input name="company_name" type="text" id="company_name" tabindex="30" size="35" />
      </p>
      <p>
        <label for="email3">Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="email" id="email3" tabindex="40" />
      </p>
      <p>
        <label for="telephone">Telephone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="telephone" id="telephone" tabindex="50" />
      </p>
      <p>
        <label for="skype3">Skype Address:&nbsp;&nbsp;</label>
        <input type="text" name="skype" id="skype3" tabindex="60" />
        <br />
        <br/>
      </p>
      <p>Please describe the problem, including model and serial#:</p>
     <p> <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </p><br />  
		<p>What is your preferred method for contact?</p>
     
        <p><input type="checkbox" name="preferred_contact" id="preferred_contact" />
      <label for="preferred_contact">Telephone</label>
       <input type="checkbox" name="email2" id="email2" />
      <label for="email2">Email</label>
     <input type="checkbox" name="skype2" id="skype2" />
        <label for="skype2">Skype</label><br/><br/>
       <p> <input type="submit" name="button" id="button" value="Submit" /></p>
    </form>
   
   <div id="apDivcontact">
      <p><img src="images/phonelogo.jpg" width="42" height="47" alt="cellphone" /><br />
        <br />
      408.980.9019 </p>
      <p>email: <a href="mailto:Joe@VMSTEK.com">Joe@VMSTEK.com</a></p>
    </div>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
  </div>
   <div style="clear:both"/> <div id="sidebar2">
     <p><img src="images/service.png" width="160" height="100" alt="VMSTEK Services" /></p>
     <p><br />
     </p>
<p>Extend the life of your valuable test and measurement equipment.</p>
<p> Joe Metzger, owner of Video Measurement Service has over 40 years of experience with the repair and recalibration of  many of the Tektronix legacy broadcast products, DK-Technologies audio meters,  timing generators, and color analyzers. Also Agilent/HP 8012B, 8013B pulse generators and HP power supplies.</p>
<p>Joe's established reputation for fast, reliable, diagnostics and quality repair services translate into high customer satisfaction. VMSTEK serves the Broadcast Industry, including ABC, NBC, CBS, Fox, and, Sony, post production and semiconductor manufacturing industry.<br />
  <br />
  DUNS:80714957</p>
</div>
<div class="footer">
     <p> <a href="index.html">Home</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ||&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="services.html"> Services</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; || &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="serviceRequest.html">Service Request</a>&nbsp;<br>
    </p>
  <!-- end .footer -->© Copyright Video Measurement Service 2011</div>
  <!-- end .container --></div>
</body>
</html>

Open in new window

0
Comment
Question by:Debora_D
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 35177689
Hi Debora_D,

In order to figure out why the form fields have stopped working, we will need to see contact_process.php
0
 

Author Comment

by:Debora_D
ID: 35177708
Yes, Of course....I think its missing those field,. I don't know where to enter them....
<?php


/* Email Variables */
$emailSubject = 'frmService!'; /*Make sure this matches the name of your file*/
$webMaster = 'joe@vmstek.com';

/*design by Mark Leroy @ http://www.helpvid.net*/

/* Data Variables */
$email = $_POST['email'];
$name = $_POST['name'];
$comments = $_POST['comments'];



$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Comments: $comments <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);


/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=http://vmstek.com/index.html">
<style type="text/css">
<!--
body {
background-color: #A1AA80; /* You can edit this CSS to match your website*/
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fec001;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Thank you for contacting Video Measurement Service.
Joe will get back to you with a response as quickly as possible.</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>

Open in new window

0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 35177739
Right here:

/* Data Variables */
$email = $_POST['email'];
$name = $_POST['name'];
$comments = $_POST['comments'];

Open in new window


This code parses the form fields and assigns them to scalar variables.  So to add more fields you use the format of:

$field = $_POST['formfieldnamefrompreviouspage']


$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Comments: $comments <br>
EOD;

Open in new window


This code takes those variables and outputs them into a simple email.   So you add to this by doing:

Label: $field <br>

where Label is the text label you want to see and $field is from step 1 above.  Just FYI, this script is doing absolutely nothing to prevent a code injection attack nor are you taking any steps to prevent spambots from submitting the form.  I strongly recommend you implement a CAPTCHA and learn about code injection and the steps you need to take to prevent it.  This form is highly insecure.
0
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

Author Comment

by:Debora_D
ID: 35184900

I think I have it?
Before I post the new contact_process.php.
Can you tell me if I'm on track?

Also, I've added form validations to the name fields, email fields, and comment fields.
I could not find on-line tutorials for adding a form CAPTCHA to an exsisting form and PHP.
I will Google code injection. I'm totally challenged by all this.
Form CAPTCHA will be my next question I'm sure.
I need to get the basics working first.

/* Data Variables */
$email = $_POST['email'];
$name = $_POST['name'];
$company = $_POST['company'];
$telephone = $_POST['telephone'];
$skype = $_POST['skype'];
$comments = $_POST['comments'];
$preferred contact = $_POST['preferred contact'];

$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Company: $coompany <br>
Telephone: $telepnone <br>
Skype: $skype <br>
Comments: $comments <br>
Preferred contact: $preferredContact <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);


/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<title>sent message</title>
<meta http-equiv="refresh" content="3;URL=http://vmstek.com/index.html">
<style type="text/css">
<!--
body {
background-color: #A1AA80; /* You can edit this CSS to match your website*/
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 20px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #fec001;
text-decoration: none;
padding-top: 200px;
margin-left: 150px;
width: 800px;
}
-->
</style>
</head>
<div align="center">Thank you for contacting Video Measurement Service.
Joe will get back to you with a response as quickly as possible.</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>

Open in new window

0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 35185123
No, that won't work as expected.  For name, you don't have a single "name" field in the form.  Instead, you have:

<input name="first_name" type="text" id="first_name"tabindex="10" size="35" />
<input name="last_name" type="text" id="last_name" tabindex="20" size="35" />

For company, it is:

<input name="company_name" type="text" id="company_name" tabindex="30" size="35" />

What happens when you submit a form via the POST method in PHP is the form fields and their values are written to name=>value pairs in a special array ($_POST).  The name of the pair in the array is the same as the name attribute in the HTML form field.

So "name" doesn't exist and $name = $_POST['name']; will always be blank for you.

Instead, you need to do it like so:

$name = $_POST['first_name']." ".$_POST['last_name']; // the . concatenates the fields and the " " puts a space in between them.

And $company = $_POST['company']; would become:

$company = $_POST['company_name'];

Go back through the PHP code and your HTML code and fix those issues.
0
 

Author Comment

by:Debora_D
ID: 35185320
O.K. I think I'm getting it.
I'm not quite sure what to do about the check box options.
I'm guessing:
$preferred_contact = $_POST['telephone'];
$preferred_contact = $_POST['email2'];
$preferred_contact = $_POST['skype2'];

I suspect that's going to be wrong?
I hope everything else is good.
<form id="frmContact" name="frmContact" method="post" action="contact_process.php">
      <p>
        <label for="first_name">First Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="first_name" type="text" id="first_name"tabindex="10" size="35" />
      </p>
      <p>
        <label for="last_name">Last Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="last_name" type="text" id="last_name" tabindex="20" size="35" />
      </p>
      <p>
        <label for="company_name">Company Name:</label>
        <input name="company_name" type="text" id="company_name" tabindex="30" size="35" />
      </p>
      <p>
        <label for="email3">Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="email" id="email3" tabindex="40" />
      </p>
      <p>
        <label for="telephone">Telephone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="telephone" id="telephone" tabindex="50" />
      </p>
      <p>
        <label for="skype3">Skype Address:&nbsp;&nbsp;</label>
        <input type="text" name="skype" id="skype3" tabindex="60" />
        <br />
        <br/>
      </p>
      <p>Please describe the problem, including model and serial#:</p>
     <p> <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </p><br />  
		<p>What is your preferred method for contact?</p>
     
        <p><input type="checkbox" name="preferred_contact" id="preferred_contact" />
      <label for="preferred_contact">Telephone</label>
       <input type="checkbox" name="email2" id="email2" />
      <label for="email2">Email</label>
     <input type="checkbox" name="skype2" id="skype2" />
        <label for="skype2">Skype</label><br/><br/>
       <p> <input name="button" type="submit" id="button" onclick="MM_validateForm('first_name','','R','last_name','','R','email3','','RisEmail','telephone','','RisNum','comments','','R');return document.MM_returnValue" value="Submit" /></p>
    </form>

Open in new window

/* Data Variables */
$name = $_POST['first_name']." ".$_POST['last_name']; 
$email = $_POST['email3'];
$company = $_POST['company_name'];
$telephone = $_POST['telephone'];
$skype = $_POST['skype3'];
$comments = $_POST['comments'];
$preferred_contact = $_POST['preferred_contact'];

$body = <<<EOD
<br><hr><br>
Name: $name <br>
Email: $email <br>
Company: $coompany <br>
Telephone: $telepnone <br>
Skype: $skype <br>
Comments: $comments <br>
Preferred contact: $preferre_contact <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);

Open in new window

0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 35186440
I'm not quite sure what to do about the check box options.
I'm guessing:
$preferred_contact = $_POST['telephone'];
$preferred_contact = $_POST['email2'];
$preferred_contact = $_POST['skype2'];

I suspect that's going to be wrong?

Yup.  That code will merely overwrite the previous attempt to set $preferred_contact with the next attempt.  

Checkboxes are a little oddball in PHP.  If you are trying to get them all in one variable, you have to use an array to do it and you have to mess with both the HTML and PHP to do it right.  In this case, I would suggest using a radio group and have the person indicate one preferred option.  If you want them to indicate multiple preferred options, you can do it like this:

$preferred_contact1 = $_POST['telephone'];
$preferred_contact2 = $_POST['email2'];
$preferred_contact3 = $_POST['skype2'];

Open in new window


and just echo each variable into the email or you can do it like this:

$preferred_contact .= $_POST['telephone']." ";
$preferred_contact .= $_POST['email2']." ";
$preferred_contact .= $_POST['skype2']." ";

Open in new window


.= appends the value to the variable instead of replacing it.
0
 

Author Comment

by:Debora_D
ID: 35202489
I'm almost there:

Dropped the Check boxes altogether ...they were too complicated for me to deal with, and, not essential.
The Name fields, the Company Name, and Comments are all working.

The Email , Telephone and Skype field names display, but not the contents.
The code all looks to be the same to my eyes, but clearly something is not right.


/* Data Variables */
$name = $_POST['first_name']." ".$_POST['last_name']; 
$company = $_POST['company_name'];
$email = $_POST['email3_name'];
$telephone = $_POST['telephone'];
$skype = $_POST['skype3'];
$comments = $_POST['comments'];

$body = <<<EOD
<br><hr><br>
Name: $name <br>
Company: $company <br>
Email: $email <br>
Telephone: $telepnone <br>
Skype: $skype <br>
Comments: $comments <br>

EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body,
$headers);

Open in new window

<form id="frmContact" name="frmContact" method="post" action="contact_process.php">
      <p>
        <label for="first_name">First Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="first_name" type="text" id="first_name"tabindex="10" size="35" />
      </p>
      <p>
        <label for="last_name">Last Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="last_name" type="text" id="last_name" tabindex="20" size="35" />
      </p>
      <p>
        <label for="company_name">Company Name:</label>
        <input name="company_name" type="text" id="company_name" tabindex="30" size="35" />
      </p>
      <p>
        <label for="email3">Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="email" id="email3" tabindex="40" />
      </p>
      <p>
        <label for="telephone">Telephone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="telephone" id="telephone" tabindex="50" />
      </p>
      <p>
        <label for="skype3">Skype Address:&nbsp;&nbsp;</label>
        <input type="text" name="skype" id="skype3" tabindex="60" />
        <br />
        <br/>
      </p>
      <p>Please describe the problem, including model and serial#:</p>
     <p> <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </p><br />

Open in new window

0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 35202805
>> The code all looks to be the same to my eyes

You'll get used to debugging code the more you do it.  See below.  You have:

$email = $_POST['email3_name'];
<input type="text" name="email" id="email3" tabindex="40" />

Remember, we are using the HTML name attribute not the id.  So in this case, the field is simply "email" and the PHP should be:

$email = $_POST['email'];

See if you can figure out the rest from there....
0
 

Accepted Solution

by:
Debora_D earned 0 total points
ID: 35209616
O.K. Thanks for the encouragement and help with this.

Now, everything is working except the telephone field...I've checked to ensure that the name attribute and the $_POST['telephone']; match and it does...

Also, I tried to make the phone field, a numbers only field and it messed everything up, (by demanding numbers to be in all required fields), so I left it character inclusive....I don't know if that has anything to do with it...Once again, I'm befuddled.
/* Data Variables */
$name = $_POST['first_name']." ".$_POST['last_name']; 
$company = $_POST['company_name'];
$email = $_POST['email'];
$telephone = $_POST['telephone'];
$skype = $_POST['skype'];
$comments = $_POST['comments'];

$body = <<<EOD
<br><hr><br>
Name: $name <br>
Company: $company <br>
Email: $email <br>
Telephone: $telepnone <br>
Skype: $skype <br>
Comments: $comments <br>

Open in new window

<form id="frmContact" name="frmContact" method="post" action="contact_process.php">
      <p>
        <label for="first_name">First Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="first_name" type="text" id="first_name"tabindex="10" size="35" />
      </p>
      <p>
        <label for="last_name">Last Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input name="last_name" type="text" id="last_name" tabindex="20" size="35" />
      </p>
      <p>
        <label for="company_name">Company Name:</label>
        <input name="company_name" type="text" id="company_name" tabindex="30" size="35" />
      </p>
      <p>
        <label for="email3">Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="email" id="email3" tabindex="40" />
      </p>
      <p>
        <label for="telephone">Telephone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
        <input type="text" name="telephone" id="telephone" tabindex="50" />
      </p>
      <p>
        <label for="skype3">Skype Address:&nbsp;&nbsp;</label>
        <input type="text" name="skype" id="skype3" tabindex="60" />
        <br />
        <br/>
      </p>
      <p>Please describe the problem, including model and serial#:</p>
     <p> <textarea name="comments" id="comments" cols="45" rows="5"></textarea> </p><br />  

     

      <p> <input name="button" type="submit" id="button" onclick="MM_validateForm('first_name','','R','last_name','','R','email3','','RisEmail','telephone','','R','comments','','R');return document.MM_returnValue" value="Submit" /></p>
    </form>

Open in new window

0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 500 total points
ID: 35209710
Telephone: $telepnone

What's a telepnone?
0
 

Author Closing Comment

by:Debora_D
ID: 35239200
You are a wonderful Tutor...Thanks for hanging in there with me! And so sorry for the typo....SHAME ON ME.
I have learned a lot about PHP coding. Thanks again, you are the best!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
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…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

728 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