6 Replies Latest reply on Apr 17, 2010 6:41 AM by Ben M

    PHP Form not working

    TYPE A Level 1

      I could really use some help with an email php form. I'm trying to get a form I created to send and then go to a thank you screen. I've tried various scripts and so far I've had no positive results.

       

      I'm not sure the best way to show this to someone and see if anyone can see what I'm lacking to make this work.

       

      Any assistance would be great. I'm trying to finish my site by Tuesday when I submit the site for my final of a class I'm taking.

       

      I will paste in the code contents of the thankyou.php file and contact.html pages.

       

      Thanks,

       

      Peter

       

       

      thankyou.php:

       

      <!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/website_template.dwt" codeOutsideHTMLIsLocked="false" -->

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

      <!-- InstanceBeginEditable name="doctitle" -->

      <title>TYPE A Sports: Thank You</title>

      <!-- InstanceEndEditable -->

      <link href="main.css" rel="stylesheet" type="text/css" />

      <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>

      <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>

      <style type="text/css">

      <!--

      #apDiv2 {

      position:absolute;

      left:240px;

      top:205px;

      width:137px;

      height:216px;

      z-index:52;

      }

      -->

      </style>

      <style type="text/css">

      <!--

      #soccer_background {

      position:absolute;

      left:-107px;

      top:207px;

      width:432px;

      height:477px;

      z-index:11;

      }

      body {

      background-image: url();

      background-repeat: no-repeat;

      }

      #content_products {

      position:absolute;

      left:333px;

      top:152px;

      width:411px;

      height:449px;

      z-index:51;

      }

      -->

      </style>

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

      <style type="text/css">

      <!--

      .ThankYou { color: #06C;

      font-family: "Arial Black", Gadget, sans-serif;

      font-size: xx-large;

      }

      -->

      </style>

      <!-- InstanceEndEditable -->

      <!-- InstanceParam name="id" type="text" value="content_products" -->

      <!-- InstanceParam name="Image" type="boolean" value="true" -->

      <!-- InstanceParam name="current page highlighted" type="text" value="#" -->

      </head>

      </div>

      <body id="#">

      <div id="container">

        <div id="logo"><a href="index.html"><img src="images/TYPE-A_8.gif" alt="logo" width="246" height="60" border="0" /></a></div>

        <div class="" id="navbar">

          <ul>

            <li><a href="index.html" class="homelink">Home</a></li>

            <li><a href="products.html" class="productslink">Products</a></li>

            <li><a href="fh01.html" class="fh01link">Videos/Resumes</a></li>

            <li><a href="tips.html" class="tipslink">Tips/Techniques</a></li>

            <li><a href="contact.html" class="contactlink">Contact Us</a></li>

            <li><a href="aboutus.html" class="aboutuslink">About Us</a></li>

          </ul>

        </div>

        <!-- InstanceBeginEditable name="Content" -->

        <div id="content_products">

          <p><span class="ThankYou"><b>Thank you</b></span></p>

          <p><b><img src="images/Thank-You-Envelopes.png" alt="thank you envelopes" width="288" height="214" onmousemove="MM_goToURL('parent','http://www.typea-sports.com/contact.html');return document.MM_returnValue" />

          </b></p>

        </div>

        <!-- InstanceEndEditable -->

        <div id="banner">

          <p>

            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="654" height="85" id="FlashID" title="Flash Banner">

              <param name="movie" value="images/Flash Banner.swf" />

              <param name="quality" value="high" />

              <param name="wmode" value="opaque" />

              <param name="swfversion" value="6.0.65.0" />

              <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->

              <param name="expressinstall" value="Scripts/expressInstall.swf" />

              <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->

              <!--[if !IE]>-->

              <object type="application/x-shockwave-flash" data="images/Flash Banner.swf" width="654" height="85">

                <!--<![endif]-->

                <param name="quality" value="high" />

                <param name="wmode" value="opaque" />

                <param name="swfversion" value="6.0.65.0" />

                <param name="expressinstall" value="Scripts/expressInstall.swf" />

                <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->

                <div>

                  <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>

                  <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>

                </div>

                <!--[if !IE]>-->

              </object>

              <!--<![endif]-->

            </object>

          </p>

        </div>

        <div id="address_phone">

          <div align="center"><span class="black">Stoneham <span class="red">781.438.7374</span></span> <span class="black"><a href="mailto:rhondarolli@aol.com">Rhonda Rolli</a><a href="rhondarolli@aol.com"></a></span><a href="mailto:peter@typea.com"> <img src="images/volleyball.jpg" alt="volleyball" width="21" height="21" border="0" align="absmiddle" /></a><span class="black"><a href="mailto:peter@typea.com"></a></span><span class="black"><a href="mailto:peter@typea.com"> Peter Amirault</a><a href="peter@typea.com"></a></span> <span class="red">781.396.1603</span> Medford</div>

        </div>

        <!-- InstanceBeginEditable name="ImageArea" -->

        <div id="soccer_background"></div>

        <!-- InstanceEndEditable --></div>

      <script type="text/javascript">

      <!--

      swfobject.registerObject("FlashID");

      //-->

      </script>

      </body>

      <!-- InstanceEnd --></html>

      contact.html:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
      <title>TYPE A Sports: Contact Us</title>
      <link href="main.css" rel="stylesheet" type="text/css" />
      <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
      <script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
      <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];}}
      }
      function MM_effectAppearFade(targetElement, duration, from, to, toggle)
      {
      Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
      }
      function MM_effectHighlight(targetElement, duration, startColor, endColor, restoreColor, toggle)
      {
      Spry.Effect.DoHighlight(targetElement, {duration: duration, from: startColor, to: endColor, restoreColor: restoreColor, toggle: toggle});
      }
      //-->
      </script>
      <style type="text/css">
      <!--
      #soccer_background {
      position:absolute;
      left:11px;
      top:99px;
      width:200px;
      height:344px;
      z-index:11;
      }
      #soccer_player {
      position:absolute;
      left:578px;
      top:301px;
      width:297px;
      height:552px;
      z-index:15;
      }
      #volleyball_player {
      position:absolute;
      left:338px;
      top:388px;
      width:297px;
      height:310px;
      z-index:18;
      }
      #field-hockey_player {
      position:absolute;
      left:631px;
      top:115px;
      width:224px;
      height:176px;
      z-index:53;
      }
      #softball_player {
      position:absolute;
      left:18px;
      top:313px;
      width:222px;
      height:443px;
      z-index:11;
      }
      #a_highlight {
      position:absolute;
      left:333px;
      top:182px;
      width:443px;
      height:417px;
      z-index:55;
      color: #000;
      }
      #playerprofile {
      position:absolute;
      left:401px;
      top:372px;
      width:217px;
      height:95px;
      z-index:13;
      font-size: 25px;
      }
      #tennis_ball {
      position:absolute;
      left:306px;
      top:187px;
      width:33px;
      height:34px;
      z-index:56;
      }
      #volleyball2 {
      position:absolute;
      left:102px;
      top:-62px;
      width:34px;
      height:31px;
      z-index:16;
      }
      #baseball {
      position:absolute;
      left:279px;
      top:279px;
      width:36px;
      height:34px;
      z-index:57;
      }
      #What_Do_You_Know {
      position:absolute;
      left:333px;
      top:131px;
      width:379px;
      height:40px;
      z-index:58;
      font-size: 36px;
      font-family: "Arial Black", Gadget, sans-serif;
      font-style: italic;
      }
      #football_player {
      position:absolute;
      left:-192px;
      top:-323px;
      width:188px;
      height:293px;
      z-index:3;
      }
      #apDiv2 {
      position:absolute;
      left:413px;
      top:417px;
      width:227px;
      height:225px;
      z-index:2;
      }
      #football {
      position:absolute;
      left:205px;
      top:330px;
      width:151px;
      height:249px;
      z-index:16;
      }
      #apDiv4 {
      position:absolute;
      left:313px;
      top:355px;
      width:37px;
      height:33px;
      z-index:60;
      }
      #photo {
      position:absolute;
      left:-98px;
      top:233px;
      width:434px;
      height:469px;
      z-index:52;
      }
      #home a.homelink,
      #products a.productslink,
      #fh01 a.fh01link,
      #tips a.tipslink,
      #contact a.contactlink,
      #aboutus a.aboutuslink {
      color: #d11242;
      cursor: default;
      }
      -->
      </style>
      <!-- TemplateParam name="current page highlighted" type="text" value="#" -->
      </head>
      <body id="contact">
      <div id="container">
        <div id="logo"><a href="index.html"><img src="images/TYPE-A_8.gif" alt="logo" width="246" height="60" border="0" /></a></div>
        <div id="navbar">
        <ul>
          <li><a href="index.html" class="homelink">Home</a></li>
            <li><a href="products.html" class="productslink">Products</a></li>
            <li><a href="fh01.html" class="fh01link">Videos/Resumes</a></li>
            <li><a href="tips.html" class="tipslink">Tips/Techniques</a></li>
            <li><a href="contact.html" class="contactlink">Contact Us</a></li>
            <li><a href="aboutus.html" class="aboutuslink">About Us</a></li>
        </ul>
        <p> </p></div>
       
        <div id="photo"><img src="images/field-hockey_background.jpg" width="385" height="363" alt="field hockey player flipped" /></div>
       
       
        <div id="banner">
          <p>
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="654" height="85" id="FlashID" title="Flash Banner">
              <param name="movie" value="images/Flash Banner.swf" />
              <param name="quality" value="high" />
              <param name="wmode" value="opaque" />
              <param name="swfversion" value="6.0.65.0" />
              <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
              <param name="expressinstall" value="Scripts/expressInstall.swf" />
              <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
              <!--[if !IE]>-->
              <object type="application/x-shockwave-flash" data="images/Flash Banner.swf" width="654" height="85">
                <!--<![endif]-->
                <param name="quality" value="high" />
                <param name="wmode" value="opaque" />
                <param name="swfversion" value="6.0.65.0" />
                <param name="expressinstall" value="Scripts/expressInstall.swf" />
                <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                <div>
                  <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                  <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                </div>
                <!--[if !IE]>-->
              </object>
              <!--<![endif]-->
            </object>
          </p>
        </div>
        <div id="address_phone">
          <div align="center"><span class="black"><span class="black">Stoneham </span><span class="red">781.438.7374</span></span> <span class="black"><a href="mailto:rhondarolli@aol.com">Rhonda Rolli</a><a href="rhondarolli@aol.com"></a></span> <img src="images/volleyball.jpg" alt="volleyball" width="21" height="21" align="absbottom" /> <span class="black"><a href="mailto:peter@typea.com">Peter Amirault</a><a href="peter@typea.com"></a></span> <span class="red">781.396.1603</span> Medford</div>
        </div>
        <div class="greenli" id="What_Do_You_Know"></div>
        <div id="a_highlight">
              <span class="red"><span class="redbul">
              <h7_black></h7_black>
        </span></span>
              <p class="bodytext">Please inquiry about our services or submit any questions you may have.</p>
              <table width="521" border="0" align="left" cellpadding="5" cellspacing="0">
                <tr>
                  <td width="72" align="left" valign="middle"><p><span class="formlabel">Name</span><span class="red">*</span></p></td>
                  <td width="429" align="left" valign="middle"><p> <span class="formcontent">
                    <input name="name" type="text" class="formcontent" id="name" size="40" />
                     </span></p></td>
                </tr>
                <tr>
                  <td valign="middle"><p class="formlabel">Email<span class="red">*</span></p></td>
                  <td valign="middle"><p> <span class="formcontent">
                    <input name="email" type="text" class="formcontent" id="email2" size="30" />
                  </span></p></td>
                </tr>
                <tr>
                  <td valign="middle"><p class="formlabel">Address</p></td>
                  <td valign="middle"><p> <span class="formcontent">
                    <input name="address" type="text" class="formcontent" id="address2" size="40" />
                  </span></p></td>
                </tr>
                <tr>
                  <td valign="middle"><p class="formlabel">City</p></td>
                  <td valign="middle"><p> <span class="formcontent">
                    <input name="city" type="text" class="formcontent" id="city" size="25" />
                      </span><span class="formlabel">State</span><span class="formcontent">
                      <input name="state" type="text" class="formcontent" id="state" size="3" maxlength="2" />
                        </span><span class="formlabel">Zip</span><span class="formcontent">
                        <input name="zip" type="text" class="formcontent" id="zip" size="10" maxlength="10" />
                      </span></p></td>
                </tr>
                <tr>
                  <td valign="middle"><p class="formlabel">Phone</p></td>
                  <td valign="middle"><p> <span class="formcontent">
                    <input name="phone" type="text" class="formcontent" id="phone" size="20" />
                  </span></p></td>
                </tr>
                <tr>
                  <td valign="top"><p class="formlabel">Comments</p></td>
                  <td valign="middle"><p> <span class="formcontent">
                    <textarea name="request" cols="55" rows="5" class="formcontent" id="memo"></textarea>
                  </span></p></td>
                </tr>
                <tr>
                  <td valign="top"> </td>
                  <td align="right" valign="top"><div align="left">
                    <input type="submit" name="submit" id="submit" value="Submit" />
                  </div></td>
                </tr>
              </table>
        </div>
      </div>
      <h5><script type="text/javascript">
      <!--
      swfobject.registerObject("FlashID");
      //-->
      </script>
      </h5></body>
      </html>