17 Replies Latest reply on Mar 8, 2010 11:42 AM by Robert Heist II

    can't get php and web form to function properly

    owenpga2 Level 1

      Hello,

       

      I have a html web form and a php code that works fine in my older website.

      i just updated my site and need to transfer the code for the html form into a newly designed page.

      I copied and pasted the form into the new page. The form come up and works properly except that it doesn't send the form to my email address.

      Everything appears to be the same as my old page but obviously i don't have them linked properly. i've attached the code to both html files. thanks for any help. Owen

       

      form code

       

      <!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"><!-- InstanceBegin template="/Templates/PGATEMPLATE3.dwt" codeOutsideHTMLIsLocked="false" -->
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <!-- InstanceBeginEditable name="doctitle" -->
      <title>Golf Lessons in Baltimore Owen Dawson PGA, GOLF INSTRUCTION IN MARYLAND, GOLF LESSONS IN BALTIMORE</title>
      <meta name="Keywords" content="GOLF INSTRUCTION, GOLF LESSONS IN BALTIMORE, BALTIMORE, MARYLAND, GOLF INSTRUCTION BALTIMORE,SHORT GAME,BUNKER PLAY" />
      <meta name="Description" content="Golf Instruction in Baltimore Maryland" />
      <!-- InstanceEndEditable -->
      <link href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/twoColFixRtHdr.css" rel="stylesheet" type="text/css" />
      <!--[if IE 5]>
      <style type="text/css">
      /* place css box model fixes for IE 5* in this conditional comment */
      .twoColFixRtHdr #sidebar1 { width: 220px; }
      </style>
      <![endif]--><!--[if IE]>
      <style type="text/css">
      /* place css fixes for all versions of IE in this conditional comment */
      .twoColFixRtHdr #sidebar1 { padding-top: 30px; }
      .twoColFixRtHdr #mainContent { zoom: 1; }
      /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
      </style>
      <![endif]-->
      <script src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
      <link href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
      <style type="text/css">
      <!--
      .style1 {
          font-size: small
      }
      .style2 {
          font-family: "Comic Sans MS", Papyrus;
          font-size: small;
      }
      .style6 {font-size: smaller; font-family: "Comic Sans MS", Papyrus; }
      .style7 {font-family: "Comic Sans MS", Papyrus}
      .style8 {color: #0000FF}
      a:link {
          text-decoration: none;
          color: #000000;
      }
      a:visited {
          text-decoration: none;
          color: #000000;
      }
      a:hover {
          text-decoration: none;
          border-top-style: none;
          border-right-style: none;
          border-bottom-style: none;
          border-left-style: none;
          border-top-color: #001EF1;
          border-right-color: #001EF1;
          border-bottom-color: #001EF1;
          border-left-color: #001EF1;
          color: #000000;
          background-color: #C1C1C1;
      }
      a:active {
          text-decoration: none;
      }
      -->
      </style>
      <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
      </head>

       

      <body class="twoColFixRtHdr">

       

      <div id="container">
        <div id="header">
          <h1><img src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/photos/newpgabannerfinal3_2_10.png" width="739" height="210" /></h1>
          <!-- InstanceBeginEditable name="EditRegion4" -->
          <ul id="MenuBar1" class="MenuBarHorizontal">
            <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/index.html" class="style1">Home</a> </li>
            <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/V1Login.html" class="style1">V1 Student Videos</a></li>
            <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Private_Lessons.html" class="style1">Private Lessons</a></li>
            <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Clinics.html" class="style1">Clinics</a></li>
            <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/PGAPHOTOGALLERY/index.html" class="style1">Photo Gallery</a> </li>
            <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Gift_Certificates.html" class="style1">Gift Certificates</a></li>
            <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Instructional_Video.html" class="style1">Instructional Video</a></li>
            <li><a href="mailto:owenpga@comcast.net" class="style1">Contact Owen</a></li>
          </ul>
          <!-- InstanceEndEditable -->
          <p align="center"> </p>
        <!-- end #header --></div>
       
        <div id="sidebar1">
          <p class="style7"><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Contact_Form.html">Instructional Form </a></p>
          <p class="style7"><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Sample_Lesson.html">Sample Lesson</a></p>
          <p class="style7"><a href="http://www.youtube.com/user/owenpga" target="_blank">Video tutorials</a></p>
          <p class="style7"><a href="http://owendawsonpga.blogspot.com" target="_blank">Instructional Blog</a></p>
          <p class="style7 style8"> </p>
          <p class="style2"> </p>
          <p class="style2">Testimonials</p>
          <p class="style7 style6">“I have been working with Owen Dawson for the past 7 years. During that time my swing has dramatically changed and improved. This has happened through Owen's drills and use of video. It is because of these techniques, that I understand how to hit good shots but just as importantly why I hit a shot poorly. I’m glad I’ve had the opportunity to work with Owen and would highly recommend him. ” <strong>Sam Young - Country Club of Maryland - 2009 Men's Club Champion </strong></p>
          <p class="style2">.............................................</p>
          <p class="style7 style6">“Owen does two things  particularly well, in my opinion.  First, he is a master of recording  technology, and it really helps me to see what I need correcting, and what the  new move needs to be.  Second, Owen knows what the best next step should be  in your own journey to a better swing.  I have taken one or two lessons  from Owen each year for the last three or four years – one relatively small  step at a time, and then worked on grooving that step.  In that period, my  index has dropped about 8 strokes, and in 2007 I won the Club’s “Most Improved  Player” award.  Kudos to Owen!”</p>
          <p class="style7 style6"><strong>Bill Smillie -CCofMD</strong></p>
          <h3 class="style2"><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Testimonials.html">Read other testimonials  </a></h3>
          <!-- end #sidebar1 -->
        </div>
        <!-- InstanceBeginEditable name="MAINCONTENT" -->
        <div id="mainContent">
            <form action="contactformprocess_original_db.php" method="post" enctype="multipart/form-data" name="form1" id="form1" target="ifr">
            <p class="style5">Name</p>
            <p>
              <label for="textfield"><span class="style5">First</span></label>
              <input type="text" name="textfield" id="textfield" />
              </p>
            <p>
              <label for="textfield2"><span class="style5">Last</span></label>
              <input type="text" name="textfield2" id="textfield2" />
            </p>
            <p><span class="style5">Phone number
                <label>
                <input type="text" name="textfield3" id="textfield3" />
                </label>
            </span></p>
            <p><span class="style5">Email</span>
              <label>
              <input type="text" name="textfield4" id="textfield4" />
              </label>
            </p>
            <p><span class="style5">Address
                <label>
                <input type="text" name="textfield5" id="textfield5" />
                </label>
            </span></p>
            <p><span class="style5">State</span>
              <label>
              <input type="text" name="textfield6" id="textfield6" />
              </label>
            </p>
            <p><span class="style5">Zip Code</span>
              <label>
              <input type="text" name="textfield7" id="textfield7" />
              </label>
            </p>
            <p><span class="style5">How did you find me?</span>
              <label for="select"></label>
              <select name="select" id="select">
                <option value="internet">Internet Search</option>
                <option value="friend referral">Friend Referral</option>
                <option value="ccmdsite">Country Club of MD website</option>
                <option value="other">Other</option>
              </select>
            </p>
            <p><span class="style5">What are your golfing goals?</span>            
              <select name="select2" id="select2">
                <option value="break 100">Break 100</option>
                <option value="break 90">Break 90</option>
                <option value="break 80">Break 80</option>
                <option value="stop slice">Stop Slicing the Ball</option>
                <option value="stop hook">Stop Hooking the Ball</option>
                <option value="Compete">Compete in local tournaments</option>
                <option value="More Consistant">Hit more consistant shots</option>
              </select>
            </p>
            <p><span class="style5">How much can you practice?</span>
              <label for="select3"></label>
              <select name="select3" id="select3">
                <option value="1 hour">1 hour</option>
                <option value="2 hours">2 hours</option>
                <option value="3 hours">3 hours </option>
                <option value="> 3 hours">More than 3 hours a week</option>
              </select>
            </p>
            <p><span class="style5">What would you like to learn?</span>
              <label for="select4"></label>
              <select name="select4" id="select4">
                <option value="full swing">Full Swing Mechanics Irons</option>
                <option value="driver swing">Full Swing Mechanics Driver</option>
                <option value="short pitches">Short Pitch Shots inside of 50 yards</option>
                <option value="bunker play">Bunker Play</option>
                <option value="chipping">Chipping</option>
                <option value="short shots">Short shots from rough</option>
              </select>
            </p>
            <p class="style5">What is your Handicap?<label for="select5"></label>
              <select name="select5" id="select5">
                <option value="scratch to 5">Scratch - 5 HDCP</option>
                <option value="6 to 10">6 - 10 HDCP</option>
                <option value="11 to 15">11 - 15 HDCP</option>
                <option value="15 to 20">15 - 20 HDCP</option>
                <option value="> 21">21 and Higher</option>
              </select>
            </p>
            <p class="style5">How long have you been playing?
              <label for="select6"></label>
              <select name="select6" id="select6">
                <option value="beginner">Beginner</option>
                <option value="2 to 5 years">2-5 yrs</option>
                <option value="6 to 10 years">6-10 yrs</option>
                <option value="11 to 15 years">11-15yrs</option>
                <option value="> 15 years">More than 15 years</option>
              </select>
            </p>
            <p class="style5">Have you ever had a lesson?
              <label for="select7"></label>
              <select name="select7" id="select7">
                <option value="yes">YES</option>
                <option value="no">NO</option>
              </select>
            </p>
            <p class="style5">Additional Information
              <label>
              <textarea name="textfield8" cols="40" id="textfield8"></textarea>
              </label>
            </p>
            <p class="style5">
              <label for="button"></label>
              <input type="button" name="button" id="button" value="Submit" onclick="submitForm()" />
            </p>
            <p class="style5"> </p>
              <div id="msg" style="font: bold 12px arial"></div>
         
          </form>
          <p align="center" class="style8"><br />
          </p>
          <p class="style8"> </p>
          <p class="style8"> </p>
          <p class="style8 style12"><strong><br />
           </strong></p>
          <p align="left"> </p>
          <h1> </h1>
          <!-- end #mainContent -->
          </div>
        <!-- InstanceEndEditable -->
        <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
        <br class="clearfloat" />
       
        <div id="footer">
          <p align="center"><a href="http://golfaroundtheworld.com" target="_blank"><img src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/photos/GAW.png" alt="" width="153" height="56" hspace="50" border="0" /></a><a href="http://www.owendawsonphotography.com" target="_blank"><img src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/photos/ody.png" width="186" height="56" hspace="50" border="0" /></a></p>
          <h2 align="center" class="style6">©Owen Dawson P.G.A. ™ All rights reserved</h2>
          <!-- end #footer -->
        </div>
        <!-- end #container --></div>
      <script type="text/javascript">
      <!--
      var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
      //-->
      </script>
      </body>
      <!-- InstanceEnd --></html>

       

       

      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

       

       

      php code

       

      <?

       

      $fname = $HTTP_POST_VARS['textfield'];

       

      $lname = $HTTP_POST_VARS['textfield2'];

       

      $phone = $HTTP_POST_VARS['textfield3'];

       

      $email = $HTTP_POST_VARS['textfield4'];

       

      $address = $HTTP_POST_VARS['textfield5'];

       

      $state = $HTTP_POST_VARS['textfield6'];

       

      $zip = $HTTP_POST_VARS['textfield7'];

       

      $find = $HTTP_POST_VARS['select'];

       

      $goals = $HTTP_POST_VARS['select2'];

       

      $practice = $HTTP_POST_VARS['select3'];

       

      $learn = $HTTP_POST_VARS['select4'];

       

      $handicap = $HTTP_POST_VARS['select5'];

       

      $timeplaying = $HTTP_POST_VARS['select6'];

       

      $lesson = $HTTP_POST_VARS['select7'];

       

      $additional = $HTTP_POST_VARS['textfield8'];

       


      //echo "$fname\n$lname\n$phone\n$email\n$address\n$state\n$zip\n$find\n$goals\n$practice\n$learn \n$handicap\n$timeplaying\n$lesson\n$additional\n";

       

      mail('owenpga@comcast.net','Owen Dawson PGA Contact Form Submission',"First Name: $fname\nLast Name: $lname\nPhone Number: $phone\nEmail: $email\nAddress: $address\nState: $state\nZip Code: $zip\nHow did you find me? $find\nWhat are your goals? $goals\nHow much can you practice? $practice\nWhat would you like to learn? $learn\nWhat is your handicap? $handicap\nHow long have you been playing golf? $timeplaying\nHave you ever taken a lesson? $lesson\nAdditional Information: $additional\n",'From: owenpga@comcast.net');

       

      ?>

       

      <html>

       

      <head>

       

      <script type="text/javascript">

       

      window.onload = function(){

       

          parent.messageSent();

       

      }

       

      </script>

       

      </head>

       

      <body>

       

      </body>

       

      </html>

        • 1. Re: can't get php and web form to function properly
          Robert Heist II Level 3

          More important than seeing your code is knowing how the formhandler fails.  First off, is your formhandler (the php file) named contactformprocess_original_db.php and in the same directory as the form itself?  Case sensitivity matters if you are on a unix server.  If it is named that and it is in the same directory then the form should be submitting to it.  Do you get an error message displayed?  If so, what?  If not, what url are you ending up on?

          1 person found this helpful
          • 2. Re: can't get php and web form to function properly
            owenpga2 Level 1

            Thanks for responding.

            Let me first say that putting together a website in dreamweaver with zero knowledge to begin with is a task. I'm very much a beginner. The php file have the same exact name other than the type of file. they are both in the same main directory as the rest of my files. no error messages. when i hit submit the page doesn't change. this is the url

            http://owendawsonpga.com/contactformprocess_original_db.html

            • 3. Re: can't get php and web form to function properly
              Robert Heist II Level 3

              First, the formhandler must have a .php extension.  By formhandler, I mean the file that the form posts it's data too.  In this case that file needs to be named exactly contactformprocess_original_db.php  So , make sure the php page actually has a php extension and is named exactly as indicated before. 

               

              Also, were you using iframes before?  I don't see why the form tag has a target on it.  I would suggest removing that to help trouble shoot it's connecting to the formhandler.  Around line 105

               

              <form action="contactformprocess_original_db.php" method="post" enctype="multipart/form-data" name="form1" id="form1" target="ifr">

               

              Finally, I noticed that the submit button has a call to a nonexistant function.  Remove the part highlighted in red from the code below, it's in line 213 or so.

               

              <input type="button" name="button" id="button" value="Submit" onclick="submitForm()" />

               

              That is probably what is stoping the form from submitting to the formhandler in the first place...though the formhandler must also be a php page, in order to execute php code and the target attribute of the form tag could be mucking up some things too.

               

              • 4. Re: can't get php and web form to function properly
                owenpga2 Level 1

                Robert,

                I wasn't clear in my explanation. the form file is contactformprocess_original_db.html and the php form is contactformprocess_original_db.php.

                i'm not going to dispute your suggesions as im new to this, but i pulled up the original files both html form file and php file which have the same names and the original html file has the errors you picked out in the code and the form works fine telling me after i hit send that message is sent.  go figure?? thanks for your suggestions.

                • 5. Re: can't get php and web form to function properly
                  Robert Heist II Level 3

                  I just reread your original post and you said that you copied the form from the original file and pasted it into the new page.  That means you missed the script in the head that contained the submitForm() function.  That is why the call on the new button isn't working.  Go back to the original file, look in the head of the doc and find the submitForm() function.  It will be between <script> tags.  Copy and paste that into the head of the new doc and leave the onclick call on the button (though I would recommend moving it to the onsubmit event of the form tag...but for now leave it on the button)

                   

                  You are using a DW template too, so the script will have to be placed between the editable region tags in the head.

                  • 6. Re: can't get php and web form to function properly
                    owenpga2 Level 1

                    i found the code, but it won't let me paste it in the head section of the page. does this need to be an editable region to add it?

                    • 7. Re: can't get php and web form to function properly
                      owenpga2 Level 1

                      sorry, just read the rest of you're response. i'll tryit


                      • 8. Re: can't get php and web form to function properly
                        owenpga2 Level 1

                        Robert,

                        The only place in the head section of the page that is editable is the title area and where my meta data is. everything else is greyed out.

                        • 9. Re: can't get php and web form to function properly
                          Robert Heist II Level 3

                          just before the closing head tag there is an editable region for inserting page specific scripts.  Look for this:

                           

                           

                          <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->

                           

                          and place the script between the 2 comments.

                          • 10. Re: can't get php and web form to function properly
                            owenpga2 Level 1

                            Robert,

                            I'm 95% there. when i upload everything it will send the form to my email, however the message that tells me it's send is missing and it jumps to a white page url

                            http://www.owendawsonpga.com/contactformprocess_original_db.php

                            • 11. Re: can't get php and web form to function properly
                              Robert Heist II Level 3

                              Alright, here is  my suggestion on the PHP page.  Create a thank you page, a basic html page that says thanks for submitting the form and then put the following line at the bottom of your php script like this:

                               

                               

                              mail('owenpga@comcast.net','Owen Dawson PGA Contact Form Submission',"First Name: $fname\nLast Name: $lname\nPhone Number: $phone\nEmail: $email\nAddress: $address\nState: $state\nZip Code: $zip\nHow did you find me? $find\nWhat are your goals? $goals\nHow much can you practice? $practice\nWhat would you like to learn? $learn\nWhat is your handicap? $handicap\nHow long have you been playing golf? $timeplaying\nHave you ever taken a lesson? $lesson\nAdditional Information: $additional\n",'From: owenpga@comcast.net');

                               

                              header("Location: http://yourdomain/thankspage.htm");

                               

                               

                               

                              ?>

                              and delete the <html> tag and everything after it.  Of course the yourdomain/thankspage.htm needs to be modified to be the path to your thank you file.

                               

                              also, just to be safe delete the echo line.  You can't change the header after you start any output.  I know the echo is commented out, but just be safe.

                               

                              //echo "$fname\n$lname\n$phone\n$email\n$address\n$state\n$zip\n$find\n$goals\n$practi ce\n$learn\n$handicap\n$timeplaying\n$lesson\n$additional\n";

                              1 person found this helpful
                              • 12. Re: can't get php and web form to function properly
                                owenpga2 Level 1

                                I'm going to  try and tackle this one tomorrow.  Something new

                                for me. thanks so much for all your help. Owen


                                • 13. Parse error
                                  owenpga2 Level 1

                                  When i load the PHP,form page and thank you page im getting this error when i hit send.

                                  No email is sent from form.

                                   

                                  Parse error: syntax error, unexpected T_STRING in /home/owendaws/public_html/owendawsonpga/contactformprocess_original_db.php on line 38

                                   

                                   

                                  PHP page

                                   

                                  <?

                                   

                                  $fname = $HTTP_POST_VARS['textfield'];

                                   

                                  $lname = $HTTP_POST_VARS['textfield2'];

                                   

                                  $phone = $HTTP_POST_VARS['textfield3'];

                                   

                                  $email = $HTTP_POST_VARS['textfield4'];

                                   

                                  $address = $HTTP_POST_VARS['textfield5'];

                                   

                                  $state = $HTTP_POST_VARS['textfield6'];

                                   

                                  $zip = $HTTP_POST_VARS['textfield7'];

                                   

                                  $find = $HTTP_POST_VARS['select'];

                                   

                                  $goals = $HTTP_POST_VARS['select2'];

                                   

                                  $practice = $HTTP_POST_VARS['select3'];

                                   

                                  $learn = $HTTP_POST_VARS['select4'];

                                   

                                  $handicap = $HTTP_POST_VARS['select5'];

                                   

                                  $timeplaying = $HTTP_POST_VARS['select6'];

                                   

                                  $lesson = $HTTP_POST_VARS['select7'];

                                   

                                  $additional = $HTTP_POST_VARS['textfield8'];

                                   

                                   

                                  mail('owenpga@comcast.net','Owen Dawson PGA Contact Form Submission',"First Name: $fname\nLast Name: $lname\nPhone Number: $phone\nEmail: $email\nAddress: $address\nState: $state\nZip Code: $zip\nHow did you find me? $find\nWhat are your goals? $goals\nHow much can you practice? $practice\nWhat would you like to learn? $learn\nWhat is your handicap? $handicap\nHow long have you been playing golf? $timeplaying\nHave you ever taken a lesson? $lesson\nAdditional Information: $additional\n",'From: owenpga@comcast.net');

                                   

                                   

                                  header("Location: http://www.owendawsonpga.com/thankyouform.html");

                                   

                                   

                                  ?>

                                   

                                  __________________________________________________________________________________________ __________________

                                   


                                  form page

                                   

                                  <!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"><!-- InstanceBegin template="/Templates/PGATEMPLATE3.dwt" codeOutsideHTMLIsLocked="false" -->
                                  <head>
                                  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                                  <!-- InstanceBeginEditable name="doctitle" -->
                                  <title>Golf Lessons in Baltimore Owen Dawson PGA, GOLF INSTRUCTION IN MARYLAND, GOLF LESSONS IN BALTIMORE</title>
                                  <meta name="Keywords" content="GOLF INSTRUCTION, GOLF LESSONS IN BALTIMORE, BALTIMORE, MARYLAND, GOLF INSTRUCTION BALTIMORE,SHORT GAME,BUNKER PLAY" />
                                  <meta name="Description" content="Golf Instruction in Baltimore Maryland" />
                                  <!-- InstanceEndEditable -->
                                  <link href="twoColFixRtHdr.css" rel="stylesheet" type="text/css" />
                                  <!--[if IE 5]>
                                  <style type="text/css">
                                  /* place css box model fixes for IE 5* in this conditional comment */
                                  .twoColFixRtHdr #sidebar1 { width: 220px; }
                                  </style>
                                  <![endif]--><!--[if IE]>
                                  <style type="text/css">
                                  /* place css fixes for all versions of IE in this conditional comment */
                                  .twoColFixRtHdr #sidebar1 { padding-top: 30px; }
                                  .twoColFixRtHdr #mainContent { zoom: 1; }
                                  /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
                                  </style>
                                  <![endif]-->
                                  <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
                                  <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
                                  <style type="text/css">
                                  <!--
                                  .style1 {
                                      font-size: small
                                  }
                                  .style2 {
                                      font-family: "Comic Sans MS", Papyrus;
                                      font-size: small;
                                  }
                                  .style6 {font-size: smaller; font-family: "Comic Sans MS", Papyrus; }
                                  .style7 {font-family: "Comic Sans MS", Papyrus}
                                  .style8 {
                                      color: #0000FF;
                                      font-family: Georgia, "Times New Roman", Times, serif;
                                  }
                                  a:link {
                                      text-decoration: none;
                                      color: #000000;
                                      background-color: #EBEBEB;
                                  }
                                  a:visited {
                                      text-decoration: none;
                                      color: #000000;
                                  }
                                  a:hover {
                                      text-decoration: none;
                                      border-top-style: none;
                                      border-right-style: none;
                                      border-bottom-style: none;
                                      border-left-style: none;
                                      border-top-color: #001EF1;
                                      border-right-color: #001EF1;
                                      border-bottom-color: #001EF1;
                                      border-left-color: #001EF1;
                                      color: #000000;
                                      background-color: #EBEBEB;
                                  }
                                  a:active {
                                      text-decoration: none;
                                  }
                                  .style9 {font-family: Georgia, "Times New Roman", Times, serif}
                                  .style10 {font-family: Georgia, "Times New Roman", Times, serif; font-size: small; }
                                  .style11 {color: #000000}
                                  .style12 {
                                      font-family: Georgia, "Times New Roman", Times, serif;
                                      color: #FF0000;
                                      font-weight: bold;
                                  }
                                  .style13 {color: #FF0000}
                                  -->
                                  </style>
                                  <!-- InstanceBeginEditable name="head" -->
                                  <script type="text/javascript">
                                  function submitForm(){
                                      var myform = document.getElementById('form1');
                                      var fname = document.getElementById('textfield');
                                      var lname = document.getElementById('textfield2');
                                      var phone = document.getElementById('textfield3');
                                     
                                      if (fname.value == ''){
                                          alert('First name is a required field.  Please enter your first name to continue.');
                                          fname.focus();
                                          return false;
                                      }
                                      if (lname.value == ''){
                                          alert('Last name is a required field.  Please enter your last name to continue.');
                                          fname.focus();
                                          return false;
                                      }
                                      if (phone.value == ''){
                                          alert('Phone number is a required field.  Please enter your preferred phone number to continue.');
                                          fname.focus();
                                          return false;
                                      }
                                      myform.submit();
                                  }

                                   

                                  function messageSent(){
                                      var status = document.getElementById('msg');
                                      status.innerHTML = 'Message sent successfully.';
                                  }
                                  </script>
                                  <!-- InstanceEndEditable -->
                                  </head>

                                   

                                  <body class="twoColFixRtHdr">

                                   

                                  <div id="container">
                                    <div id="header">
                                      <h1><img src="photos/newpgabannerfinal3_2_10.png" width="739" height="210" /></h1>
                                      <!-- InstanceBeginEditable name="EditRegion4" -->
                                      <ul id="MenuBar1" class="MenuBarHorizontal">
                                        <li><a href="V1Login.html" class="style1">V1 Student Videos</a></li>
                                        <li><a href="Private_Lessons.html" class="style1">Private Lessons</a></li>
                                        <li><a href="Clinics.html" class="style1">Clinics</a></li>
                                        <li><a href="Gift_Certificates.html" class="style1">Gift Certificates</a></li>
                                        <li><a href="Instructional_Video.html" class="style1">Instructional Video</a></li>
                                        <li><a href="mailto:owenpga@comcast.net" class="style1">Contact Owen</a></li>
                                      </ul>
                                      <!-- InstanceEndEditable -->
                                      <p align="center"> </p>
                                    <!-- end #header --></div>
                                   
                                    <div id="sidebar1">
                                      <p class="style12"><a href="newfor2010.html" class="style13">New V1 Swing Analysis Software for 2010</a></p>
                                      <p class="style7"><a href="contactformprocess_original_db.html">Instructional Form </a></p>
                                      <p class="style7"><span class="style9"><span class="style9"><a href="Sample_Lesson.html">Sample Lesson</a></span></span></p>
                                      <p class="style9"><a href="http://www.youtube.com/user/owenpga" target="_blank">Video tutorials</a></p>
                                      <p class="style9"><a href="http://owendawsonpga.blogspot.com" target="_blank">Instructional Blog</a></p>
                                      <p class="style7 style8"><a href="PGAPHOTOGALLERY/index.html" target="_blank" class="style9">Photo Gallery</a></p>
                                      <p class="style7 style8 style11"><a href="Instructional_Video.html">Intructional Video</a></p>
                                      <p class="style7 style8"> </p>
                                      <p class="style10">Testimonials</p>
                                      <p class="style6 style9">“I have been working with Owen Dawson for the past 7 years. During that time my swing has dramatically changed and improved. This has happened through Owen's drills and use of video. It is because of these techniques, that I understand how to hit good shots but just as importantly why I hit a shot poorly. I’m glad I’ve had the opportunity to work with Owen and would highly recommend him. ” <strong>Sam Young - Country Club of Maryland - 2009 Men's Club Champion </strong></p>
                                      <p class="style2">.............................................</p>
                                      <p class="style6 style9">“Owen does two things  particularly well, in my opinion.  First, he is a master of recording  technology, and it really helps me to see what I need correcting, and what the  new move needs to be.  Second, Owen knows what the best next step should be  in your own journey to a better swing.  I have taken one or two lessons  from Owen each year for the last three or four years – one relatively small  step at a time, and then worked on grooving that step.  In that period, my  index has dropped about 8 strokes, and in 2007 I won the Club’s “Most Improved  Player” award.  Kudos to Owen!”</p>
                                      <p class="style6 style9"><strong>Bill Smillie -CCofMD</strong></p>
                                      <h3 class="style2"><a href="Testimonials.html">Read other testimonials  </a></h3>
                                      <!-- end #sidebar1 -->
                                    </div>
                                    <!-- InstanceBeginEditable name="MAINCONTENT" -->
                                    <div id="mainContent">
                                        <form action="contactformprocess_original_db.php" method="post" enctype="multipart/form-data" name="form1" id="form1" target="ifr">
                                        <p class="style5">Name</p>
                                        <p>
                                          <label for="textfield"><span class="style5">First</span></label>
                                          <input type="text" name="textfield" id="textfield" />
                                          </p>
                                        <p>
                                          <label for="textfield2"><span class="style5">Last</span></label>
                                          <input type="text" name="textfield2" id="textfield2" />
                                        </p>
                                        <p><span class="style5">Phone number
                                            <label>
                                            <input type="text" name="textfield3" id="textfield3" />
                                            </label>
                                        </span></p>
                                        <p><span class="style5">Email</span>
                                          <label>
                                          <input type="text" name="textfield4" id="textfield4" />
                                          </label>
                                        </p>
                                        <p><span class="style5">Address
                                            <label>
                                            <input type="text" name="textfield5" id="textfield5" />
                                            </label>
                                        </span></p>
                                        <p><span class="style5">State</span>
                                          <label>
                                          <input type="text" name="textfield6" id="textfield6" />
                                          </label>
                                        </p>
                                        <p><span class="style5">Zip Code</span>
                                          <label>
                                          <input type="text" name="textfield7" id="textfield7" />
                                          </label>
                                        </p>
                                        <p><span class="style5">How did you find me?</span>
                                          <label for="select"></label>
                                          <select name="select" id="select">
                                            <option value="internet">Internet Search</option>
                                            <option value="friend referral">Friend Referral</option>
                                            <option value="ccmdsite">Country Club of MD website</option>
                                            <option value="other">Other</option>
                                          </select>
                                        </p>
                                        <p><span class="style5">What are your golfing goals?</span>            
                                          <select name="select2" id="select2">
                                            <option value="break 100">Break 100</option>
                                            <option value="break 90">Break 90</option>
                                            <option value="break 80">Break 80</option>
                                            <option value="stop slice">Stop Slicing the Ball</option>
                                            <option value="stop hook">Stop Hooking the Ball</option>
                                            <option value="Compete">Compete in local tournaments</option>
                                            <option value="More Consistant">Hit more consistant shots</option>
                                          </select>
                                        </p>
                                        <p><span class="style5">How much can you practice?</span>
                                          <label for="select3"></label>
                                          <select name="select3" id="select3">
                                            <option value="1 hour">1 hour</option>
                                            <option value="2 hours">2 hours</option>
                                            <option value="3 hours">3 hours </option>
                                            <option value="> 3 hours">More than 3 hours a week</option>
                                          </select>
                                        </p>
                                        <p><span class="style5">What would you like to learn?</span>
                                          <label for="select4"></label>
                                          <select name="select4" id="select4">
                                            <option value="full swing">Full Swing Mechanics Irons</option>
                                            <option value="driver swing">Full Swing Mechanics Driver</option>
                                            <option value="short pitches">Short Pitch Shots inside of 50 yards</option>
                                            <option value="bunker play">Bunker Play</option>
                                            <option value="chipping">Chipping</option>
                                            <option value="short shots">Short shots from rough</option>
                                          </select>
                                        </p>
                                        <p class="style5">What is your Handicap?<label for="select5"></label>
                                          <select name="select5" id="select5">
                                            <option value="scratch to 5">Scratch - 5 HDCP</option>
                                            <option value="6 to 10">6 - 10 HDCP</option>
                                            <option value="11 to 15">11 - 15 HDCP</option>
                                            <option value="15 to 20">15 - 20 HDCP</option>
                                            <option value="> 21">21 and Higher</option>
                                          </select>
                                        </p>
                                        <p class="style5">How long have you been playing?
                                          <label for="select6"></label>
                                          <select name="select6" id="select6">
                                            <option value="beginner">Beginner</option>
                                            <option value="2 to 5 years">2-5 yrs</option>
                                            <option value="6 to 10 years">6-10 yrs</option>
                                            <option value="11 to 15 years">11-15yrs</option>
                                            <option value="> 15 years">More than 15 years</option>
                                          </select>
                                        </p>
                                        <p class="style5">Have you ever had a lesson?
                                          <label for="select7"></label>
                                          <select name="select7" id="select7">
                                            <option value="yes">YES</option>
                                            <option value="no">NO</option>
                                          </select>
                                        </p>
                                        <p class="style5">Additional Information
                                          <label>
                                          <textarea name="textfield8" cols="40" id="textfield8"></textarea>
                                          </label>
                                        </p>
                                        <p class="style5">
                                          <label for="button"></label>
                                          <input type="submit" name="Submit" id="button" value="Submit"onclick="submitForm()" />
                                        </p>
                                        <p class="style5"> </p>
                                          <div id="msg" style="font: bold 12px arial"></div>
                                     
                                      </form>
                                      <p align="center" class="style8"><br />
                                      </p>
                                      <p class="style8"> </p>
                                      <p class="style8"> </p>
                                      <p class="style8 style12"><strong><br />
                                       </strong></p>
                                      <p align="left"> </p>
                                      <h1> </h1>
                                      <!-- end #mainContent -->
                                      </div>
                                    <!-- InstanceEndEditable -->
                                    <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
                                    <br class="clearfloat" />
                                   
                                    <div id="footer">
                                      <p align="center"><a href="http://www.v1golf.com" target="_blank"><img src="photos/GAW.png" width="163" height="60" hspace="20" border="0" /><img src="photos/logo.png" width="80" height="76" hspace="40" border="0" /></a><a href="http://www.owendawsonphotography.com" target="_blank"><img src="photos/ody.png" width="199" height="59" border="0" /></a></p>
                                      <h2 align="center" class="style6">©Owen Dawson P.G.A. ™ All rights reserved</h2>
                                      <!-- end #footer -->
                                    </div>
                                  <!-- end #container --></div>
                                  <script type="text/javascript">
                                  <!--
                                  var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
                                  //-->
                                  </script>
                                  </body>
                                  <!-- InstanceEnd --></html>

                                   

                                  __________________________________________________________________________________________ ____________________________

                                   

                                  thank you page

                                   

                                  <!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>Untitled Document</title>
                                  </head>

                                   

                                  <body>
                                  Thank you for fill out my lesson form. I will be in touch with you shortly. Owen
                                  </body>
                                  </html>

                                  • 14. Re: Parse error
                                    Robert Heist II Level 3

                                    I take it line 38 is the line with  header("Location: http://www.owendawsonpga.com/thankyouform.html");  Correct?

                                    • 15. Re: Parse error
                                      owenpga2 Level 1

                                      correct

                                      • 16. Re: Parse error
                                        Robert Heist II Level 3

                                        maybe try redirect instead:

                                         

                                        http_redirect("thankyouform.html");

                                         

                                        or

                                         

                                        http_redirect("http://www.owendawsonpga.com/thankyouform.html");

                                        • 17. Re: Parse error
                                          Robert Heist II Level 3

                                          How about making sure the mail() function is working by just ending the script there for now.  Take out the header line all together and just see if the mail function executes properly.  If not, then the error isn't the header() function, it is something with the mail() function.  It sounds like there is a quote mark out of place somewhere but I can't see it in the code you shared.  Maybe you can track it down with the colorcoding in DW.