14 Replies Latest reply on Jun 19, 2008 8:49 AM by

    PHP Email Form

    NVaughanUK
      Hi There, Would you be good enough to help me with my PHP email form im struggling to configure correctly. Following an online tutorial I made a few changes to make my own link exchange form.

      ---------- Firstly I created the form and added it to my HTML page with this script--------------------

      <form name="form2" method="post" action="linkexchange.php">
      <table width="100%" cellpadding="6">
      <tr>
      <td><div align="right">
      <label for="label">Site Title:</label>
      </div></td>
      <td><div align="left">
      <input type="text" name="title" id="label" />
      </div></td>
      </tr>
      <tr>
      <td><div align="right">
      <label for="label2">Site URL:</label>
      </div></td>
      <td><div align="left">
      <input type="text" name="url" id="label2" />
      </div></td>
      </tr>
      <tr>
      <td><div align="right">
      <label for="label3">Site Description:</label>
      </div></td>
      <td><div align="left">
      <textarea name="description" id="label3" cols="22" rows="5"></textarea>
      </div></td>
      </tr>
      <tr>
      <td><div align="right">
      <label for="label4">Site Location:</label>
      </div></td>
      <td><div align="left">
      <input type="text" name="location" id="label4" />
      </div></td>
      </tr>
      <tr>
      <td><div align="right">
      <label for="label5">Email:</label>
      </div></td>
      <td><div align="left">
      <input type="text" name="email" id="label5" />
      </div></td>
      </tr>
      <tr>
      <td><div align="right">
      <label for="submit"></label>
      <input type="submit" name="submit" id="submit" value="Submit" />
      </div></td>
      <td><div align="left"></div></td>
      </tr>
      </table>
      </form>

      ---------- Then I followed a tutorial to create the php script for processing ----------

      <?php

      /* Subject and Email Variable */

      $emailSubject = 'Link Exchange Request!';
      $webMaster = 'mywebsite@mywebsite.co.uk';

      /* Link Exchange Request Variables */

      $titleField = $_POST['title'];
      $urlField = $_POST['url'];
      $descriptionField = $_POST['description'];
      $locationField = $_POST['location'];
      $emailField = $_POST['email'];

      $body = <<<EOD
      <br><hr><br>
      Title: $title <br>
      URL: $url <br>
      Description: $description <br>
      Location: $location <br>
      Email: $email <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
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Untitled Document</title>
      <style type="text/css">
      <!--
      .style1 {
      color: #000000;
      font-weight: bold;
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 12px;
      }
      .style2 {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 12px;
      }
      .style3 {
      color: #990000
      }
      -->
      </style>
      </head>

      <body>
      <p class="style1">Your Email was Sent Successfully!</p>
      </body>
      </html>
      EOD;
      echo "$theResults";

      ?>

      --------------- However, when I hit the submit button I get this message----------

      Internal Server Error
      The server encountered an internal error or misconfiguration and was unable to complete your request.
      Please contact the server administrator, mywebsite@mywebsite.co.uk and inform them of the time the error occurred, and anything you might have done that may have caused the error.

      More information about this error may be available in the server error log.

      ------------------------------------------------------------------------------------------ ------------------------

      Just a few things you may need to know. I have moved my php page into my cgi-bin page and to the root of my site and sometimes tells me the page could not be found even though its uploaded on my server and I'ved checked to see if its there myself. I would really appreciate it if anyone can tell me where my scripting error is or perhaps correcting the error for me.
        • 1. Re: PHP Email Form
          Level 7
          The PHP page needs to be right where this action attribute expects it to
          be -

          <form name="form2" method="post" action="linkexchange.php">

          Is that where it is?

          In your code, I see this -

          > $emailField = $_POST['email'];

          and then this -

          > Email: $email <br>
          > EOD;
          >
          > $headers = "From: $email\r\n";

          Shouldn't both of those $email usages be $emailField?

          Also you have this -

          > $success = mail($webMaster, emailSubject, $body, $headers);

          Shouldn't that be this -

          > $success = mail($webMaster, $emailSubject, $body, $headers);

          --
          Murray --- ICQ 71997575
          Adobe Community Expert
          (If you *MUST* email me, don't LAUGH when you do so!)
          ==================
          http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
          http://www.dwfaq.com - DW FAQs, Tutorials & Resources
          ==================


          "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
          news:g34vkp$rut$1@forums.macromedia.com...
          > Hi There, Would you be good enough to help me with my PHP email form im
          > struggling to configure correctly. Following an online tutorial I made a
          > few
          > changes to make my own link exchange form.
          >
          > ---------- Firstly I created the form and added it to my HTML page with
          > this
          > script
          --------------------
          >
          > <form name="form2" method="post" action="linkexchange.php">
          > <table width="100%" cellpadding="6">
          > <tr>
          > <td><div align="right">
          > <label for="label">Site Title:</label>
          > </div></td>
          > <td><div align="left">
          > <input type="text" name="title" id="label" />
          > </div></td>
          > </tr>
          > <tr>
          > <td><div align="right">
          > <label for="label2">Site URL:</label>
          > </div></td>
          > <td><div align="left">
          > <input type="text" name="url" id="label2" />
          > </div></td>
          > </tr>
          > <tr>
          > <td><div align="right">
          > <label for="label3">Site Description:</label>
          > </div></td>
          > <td><div align="left">
          > <textarea name="description" id="label3" cols="22"
          > rows="5"></textarea>
          > </div></td>
          > </tr>
          > <tr>
          > <td><div align="right">
          > <label for="label4">Site Location:</label>
          > </div></td>
          > <td><div align="left">
          > <input type="text" name="location" id="label4" />
          > </div></td>
          > </tr>
          > <tr>
          > <td><div align="right">
          > <label for="label5">Email:</label>
          > </div></td>
          > <td><div align="left">
          > <input type="text" name="email" id="label5" />
          > </div></td>
          > </tr>
          > <tr>
          > <td><div align="right">
          > <label for="submit"></label>
          > <input type="submit" name="submit" id="submit" value="Submit"
          > />
          > </div></td>
          > <td><div align="left"></div></td>
          > </tr>
          > </table>
          > </form>
          >
          > ---------- Then I followed a tutorial to create the php script for
          > processing
          ----------
          >
          > <?php
          >
          > /* Subject and Email Variable */
          >
          > $emailSubject = 'Link Exchange Request!';
          > $webMaster = 'mywebsite@mywebsite.co.uk';
          >
          > /* Link Exchange Request Variables */
          >
          > $titleField = $_POST['title'];
          > $urlField = $_POST['url'];
          > $descriptionField = $_POST['description'];
          > $locationField = $_POST['location'];
          > $emailField = $_POST['email'];
          >
          > $body = <<<EOD
          > <br>
          <br>
          > Title: $title <br>
          > URL: $url <br>
          > Description: $description <br>
          > Location: $location <br>
          > Email: $email <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
          > <head>
          > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
          > <title>Untitled Document</title>
          > <style type="text/css">
          > <!--
          > .style1 {
          > color: #000000;
          > font-weight: bold;
          > font-family: Verdana, Arial, Helvetica, sans-serif;
          > font-size: 12px;
          > }
          > .style2 {
          > font-family: Verdana, Arial, Helvetica, sans-serif;
          > font-size: 12px;
          > }
          > .style3 {
          > color: #990000
          > }
          > -->
          > </style>
          > </head>
          >
          > <body>
          > <p class="style1">Your Email was Sent Successfully!</p>
          > </body>
          > </html>
          > EOD;
          > echo "$theResults";
          >
          > ?>
          >
          > --------------- However, when I hit the submit button I get this
          > message
          ----------
          >
          > Internal Server Error
          > The server encountered an internal error or misconfiguration and was
          > unable to
          > complete your request.
          > Please contact the server administrator, mywebsite@mywebsite.co.uk and
          > inform
          > them of the time the error occurred, and anything you might have done that
          > may
          > have caused the error.
          >
          > More information about this error may be available in the server error
          > log.
          >
          >
          > --------------------------------------------------------------------------------
          > ----------------------------------
          >
          > Just a few things you may need to know. I have moved my php page into my
          > cgi-bin page and to the root of my site and sometimes tells me the page
          > could
          > not be found even though its uploaded on my server and I'ved checked to
          > see if
          > its there myself. I would really appreciate it if anyone can tell me where
          > my
          > scripting error is or perhaps correcting the error for me.
          >

          • 2. Re: PHP Email Form
            NVaughanUK Level 1
            Nice one for pointing out those errors I've made. I still can't get the damn thing to work though even with those changes. If you have a bit more advice you could share it would be much appreciated : )


            quote:

            Originally posted by: Newsgroup User
            The PHP page needs to be right where this action attribute expects it to
            be -

            <form name="form2" method="post" action="linkexchange.php">

            Is that where it is?

            In your code, I see this -

            > $emailField = $_POST['email'];

            and then this -

            > Email: $email <br>
            > EOD;
            >
            > $headers = "From: $email\r\n";

            Shouldn't both of those $email usages be $emailField?

            Also you have this -

            > $success = mail($webMaster, emailSubject, $body, $headers);

            Shouldn't that be this -

            > $success = mail($webMaster, $emailSubject, $body, $headers);

            --
            Murray --- ICQ 71997575
            Adobe Community Expert
            (If you *MUST* email me, don't LAUGH when you do so!)
            ==================
            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
            ==================


            "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
            news:g34vkp$rut$1@forums.macromedia.com...
            > Hi There, Would you be good enough to help me with my PHP email form im
            > struggling to configure correctly. Following an online tutorial I made a
            > few
            > changes to make my own link exchange form.
            >
            > ---------- Firstly I created the form and added it to my HTML page with
            > this
            > script
            --------------------
            >
            > <form name="form2" method="post" action="linkexchange.php">
            > <table width="100%" cellpadding="6">
            > <tr>
            > <td><div align="right">
            > <label for="label">Site Title:</label>
            > </div></td>
            > <td><div align="left">
            > <input type="text" name="title" id="label" />
            > </div></td>
            > </tr>
            > <tr>
            > <td><div align="right">
            > <label for="label2">Site URL:</label>
            > </div></td>
            > <td><div align="left">
            > <input type="text" name="url" id="label2" />
            > </div></td>
            > </tr>
            > <tr>
            > <td><div align="right">
            > <label for="label3">Site Description:</label>
            > </div></td>
            > <td><div align="left">
            > <textarea name="description" id="label3" cols="22"
            > rows="5"></textarea>
            > </div></td>
            > </tr>
            > <tr>
            > <td><div align="right">
            > <label for="label4">Site Location:</label>
            > </div></td>
            > <td><div align="left">
            > <input type="text" name="location" id="label4" />
            > </div></td>
            > </tr>
            > <tr>
            > <td><div align="right">
            > <label for="label5">Email:</label>
            > </div></td>
            > <td><div align="left">
            > <input type="text" name="email" id="label5" />
            > </div></td>
            > </tr>
            > <tr>
            > <td><div align="right">
            > <label for="submit"></label>
            > <input type="submit" name="submit" id="submit" value="Submit"
            > />
            > </div></td>
            > <td><div align="left"></div></td>
            > </tr>
            > </table>
            > </form>
            >
            > ---------- Then I followed a tutorial to create the php script for
            > processing
            ----------
            >
            > <?php
            >
            > /* Subject and Email Variable */
            >
            > $emailSubject = 'Link Exchange Request!';
            > $webMaster = 'mywebsite@mywebsite.co.uk';
            >
            > /* Link Exchange Request Variables */
            >
            > $titleField = $_POST['title'];
            > $urlField = $_POST['url'];
            > $descriptionField = $_POST['description'];
            > $locationField = $_POST['location'];
            > $emailField = $_POST['email'];
            >
            > $body = <<<EOD
            > <br>
            <br>
            > Title: $title <br>
            > URL: $url <br>
            > Description: $description <br>
            > Location: $location <br>
            > Email: $email <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
            > <head>
            > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            > <title>Untitled Document</title>
            > <style type="text/css">
            > <!--
            > .style1 {
            > color: #000000;
            > font-weight: bold;
            > font-family: Verdana, Arial, Helvetica, sans-serif;
            > font-size: 12px;
            > }
            > .style2 {
            > font-family: Verdana, Arial, Helvetica, sans-serif;
            > font-size: 12px;
            > }
            > .style3 {
            > color: #990000
            > }
            > -->
            > </style>
            > </head>
            >
            > <body>
            > <p class="style1">Your Email was Sent Successfully!</p>
            > </body>
            > </html>
            > EOD;
            > echo "$theResults";
            >
            > ?>
            >
            > --------------- However, when I hit the submit button I get this
            > message
            ----------
            >
            > Internal Server Error
            > The server encountered an internal error or misconfiguration and was
            > unable to
            > complete your request.
            > Please contact the server administrator, mywebsite@mywebsite.co.uk and
            > inform
            > them of the time the error occurred, and anything you might have done that
            > may
            > have caused the error.
            >
            > More information about this error may be available in the server error
            > log.
            >
            >
            > --------------------------------------------------------------------------------
            > ----------------------------------
            >
            > Just a few things you may need to know. I have moved my php page into my
            > cgi-bin page and to the root of my site and sometimes tells me the page
            > could
            > not be found even though its uploaded on my server and I'ved checked to
            > see if
            > its there myself. I would really appreciate it if anyone can tell me where
            > my
            > scripting error is or perhaps correcting the error for me.
            >




            • 3. Re: PHP Email Form
              NVaughanUK Level 1
              Nice one for pointing out those errors I've made. I still can't get the damn thing to work though even with those changes. If you have a bit more advice you could share it would be much appreciated : )


              quote:

              Originally posted by: Newsgroup User
              The PHP page needs to be right where this action attribute expects it to
              be -

              <form name="form2" method="post" action="linkexchange.php">

              Is that where it is?

              In your code, I see this -

              > $emailField = $_POST['email'];

              and then this -

              > Email: $email <br>
              > EOD;
              >
              > $headers = "From: $email\r\n";

              Shouldn't both of those $email usages be $emailField?

              Also you have this -

              > $success = mail($webMaster, emailSubject, $body, $headers);

              Shouldn't that be this -

              > $success = mail($webMaster, $emailSubject, $body, $headers);

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
              news:g34vkp$rut$1@forums.macromedia.com...
              > Hi There, Would you be good enough to help me with my PHP email form im
              > struggling to configure correctly. Following an online tutorial I made a
              > few
              > changes to make my own link exchange form.
              >
              > ---------- Firstly I created the form and added it to my HTML page with
              > this
              > script
              --------------------
              >
              > <form name="form2" method="post" action="linkexchange.php">
              > <table width="100%" cellpadding="6">
              > <tr>
              > <td><div align="right">
              > <label for="label">Site Title:</label>
              > </div></td>
              > <td><div align="left">
              > <input type="text" name="title" id="label" />
              > </div></td>
              > </tr>
              > <tr>
              > <td><div align="right">
              > <label for="label2">Site URL:</label>
              > </div></td>
              > <td><div align="left">
              > <input type="text" name="url" id="label2" />
              > </div></td>
              > </tr>
              > <tr>
              > <td><div align="right">
              > <label for="label3">Site Description:</label>
              > </div></td>
              > <td><div align="left">
              > <textarea name="description" id="label3" cols="22"
              > rows="5"></textarea>
              > </div></td>
              > </tr>
              > <tr>
              > <td><div align="right">
              > <label for="label4">Site Location:</label>
              > </div></td>
              > <td><div align="left">
              > <input type="text" name="location" id="label4" />
              > </div></td>
              > </tr>
              > <tr>
              > <td><div align="right">
              > <label for="label5">Email:</label>
              > </div></td>
              > <td><div align="left">
              > <input type="text" name="email" id="label5" />
              > </div></td>
              > </tr>
              > <tr>
              > <td><div align="right">
              > <label for="submit"></label>
              > <input type="submit" name="submit" id="submit" value="Submit"
              > />
              > </div></td>
              > <td><div align="left"></div></td>
              > </tr>
              > </table>
              > </form>
              >
              > ---------- Then I followed a tutorial to create the php script for
              > processing
              ----------
              >
              > <?php
              >
              > /* Subject and Email Variable */
              >
              > $emailSubject = 'Link Exchange Request!';
              > $webMaster = 'mywebsite@mywebsite.co.uk';
              >
              > /* Link Exchange Request Variables */
              >
              > $titleField = $_POST['title'];
              > $urlField = $_POST['url'];
              > $descriptionField = $_POST['description'];
              > $locationField = $_POST['location'];
              > $emailField = $_POST['email'];
              >
              > $body = <<<EOD
              > <br>
              <br>
              > Title: $title <br>
              > URL: $url <br>
              > Description: $description <br>
              > Location: $location <br>
              > Email: $email <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
              > <head>
              > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              > <title>Untitled Document</title>
              > <style type="text/css">
              > <!--
              > .style1 {
              > color: #000000;
              > font-weight: bold;
              > font-family: Verdana, Arial, Helvetica, sans-serif;
              > font-size: 12px;
              > }
              > .style2 {
              > font-family: Verdana, Arial, Helvetica, sans-serif;
              > font-size: 12px;
              > }
              > .style3 {
              > color: #990000
              > }
              > -->
              > </style>
              > </head>
              >
              > <body>
              > <p class="style1">Your Email was Sent Successfully!</p>
              > </body>
              > </html>
              > EOD;
              > echo "$theResults";
              >
              > ?>
              >
              > --------------- However, when I hit the submit button I get this
              > message
              ----------
              >
              > Internal Server Error
              > The server encountered an internal error or misconfiguration and was
              > unable to
              > complete your request.
              > Please contact the server administrator, mywebsite@mywebsite.co.uk and
              > inform
              > them of the time the error occurred, and anything you might have done that
              > may
              > have caused the error.
              >
              > More information about this error may be available in the server error
              > log.
              >
              >
              > --------------------------------------------------------------------------------
              > ----------------------------------
              >
              > Just a few things you may need to know. I have moved my php page into my
              > cgi-bin page and to the root of my site and sometimes tells me the page
              > could
              > not be found even though its uploaded on my server and I'ved checked to
              > see if
              > its there myself. I would really appreciate it if anyone can tell me where
              > my
              > scripting error is or perhaps correcting the error for me.
              >




              • 4. Re: PHP Email Form
                NVaughanUK Level 1
                Nice one for pointing out those errors I've made. I still can't get the damn thing to work though even with those changes. If you have a bit more advice you could share it would be much appreciated : )


                quote:

                Originally posted by: Newsgroup User
                The PHP page needs to be right where this action attribute expects it to
                be -

                <form name="form2" method="post" action="linkexchange.php">

                Is that where it is?

                In your code, I see this -

                > $emailField = $_POST['email'];

                and then this -

                > Email: $email <br>
                > EOD;
                >
                > $headers = "From: $email\r\n";

                Shouldn't both of those $email usages be $emailField?

                Also you have this -

                > $success = mail($webMaster, emailSubject, $body, $headers);

                Shouldn't that be this -

                > $success = mail($webMaster, $emailSubject, $body, $headers);

                --
                Murray --- ICQ 71997575
                Adobe Community Expert
                (If you *MUST* email me, don't LAUGH when you do so!)
                ==================
                http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                ==================


                "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
                news:g34vkp$rut$1@forums.macromedia.com...
                > Hi There, Would you be good enough to help me with my PHP email form im
                > struggling to configure correctly. Following an online tutorial I made a
                > few
                > changes to make my own link exchange form.
                >
                > ---------- Firstly I created the form and added it to my HTML page with
                > this
                > script
                --------------------
                >
                > <form name="form2" method="post" action="linkexchange.php">
                > <table width="100%" cellpadding="6">
                > <tr>
                > <td><div align="right">
                > <label for="label">Site Title:</label>
                > </div></td>
                > <td><div align="left">
                > <input type="text" name="title" id="label" />
                > </div></td>
                > </tr>
                > <tr>
                > <td><div align="right">
                > <label for="label2">Site URL:</label>
                > </div></td>
                > <td><div align="left">
                > <input type="text" name="url" id="label2" />
                > </div></td>
                > </tr>
                > <tr>
                > <td><div align="right">
                > <label for="label3">Site Description:</label>
                > </div></td>
                > <td><div align="left">
                > <textarea name="description" id="label3" cols="22"
                > rows="5"></textarea>
                > </div></td>
                > </tr>
                > <tr>
                > <td><div align="right">
                > <label for="label4">Site Location:</label>
                > </div></td>
                > <td><div align="left">
                > <input type="text" name="location" id="label4" />
                > </div></td>
                > </tr>
                > <tr>
                > <td><div align="right">
                > <label for="label5">Email:</label>
                > </div></td>
                > <td><div align="left">
                > <input type="text" name="email" id="label5" />
                > </div></td>
                > </tr>
                > <tr>
                > <td><div align="right">
                > <label for="submit"></label>
                > <input type="submit" name="submit" id="submit" value="Submit"
                > />
                > </div></td>
                > <td><div align="left"></div></td>
                > </tr>
                > </table>
                > </form>
                >
                > ---------- Then I followed a tutorial to create the php script for
                > processing
                ----------
                >
                > <?php
                >
                > /* Subject and Email Variable */
                >
                > $emailSubject = 'Link Exchange Request!';
                > $webMaster = 'mywebsite@mywebsite.co.uk';
                >
                > /* Link Exchange Request Variables */
                >
                > $titleField = $_POST['title'];
                > $urlField = $_POST['url'];
                > $descriptionField = $_POST['description'];
                > $locationField = $_POST['location'];
                > $emailField = $_POST['email'];
                >
                > $body = <<<EOD
                > <br>
                <br>
                > Title: $title <br>
                > URL: $url <br>
                > Description: $description <br>
                > Location: $location <br>
                > Email: $email <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
                > <head>
                > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                > <title>Untitled Document</title>
                > <style type="text/css">
                > <!--
                > .style1 {
                > color: #000000;
                > font-weight: bold;
                > font-family: Verdana, Arial, Helvetica, sans-serif;
                > font-size: 12px;
                > }
                > .style2 {
                > font-family: Verdana, Arial, Helvetica, sans-serif;
                > font-size: 12px;
                > }
                > .style3 {
                > color: #990000
                > }
                > -->
                > </style>
                > </head>
                >
                > <body>
                > <p class="style1">Your Email was Sent Successfully!</p>
                > </body>
                > </html>
                > EOD;
                > echo "$theResults";
                >
                > ?>
                >
                > --------------- However, when I hit the submit button I get this
                > message
                ----------
                >
                > Internal Server Error
                > The server encountered an internal error or misconfiguration and was
                > unable to
                > complete your request.
                > Please contact the server administrator, mywebsite@mywebsite.co.uk and
                > inform
                > them of the time the error occurred, and anything you might have done that
                > may
                > have caused the error.
                >
                > More information about this error may be available in the server error
                > log.
                >
                >
                > --------------------------------------------------------------------------------
                > ----------------------------------
                >
                > Just a few things you may need to know. I have moved my php page into my
                > cgi-bin page and to the root of my site and sometimes tells me the page
                > could
                > not be found even though its uploaded on my server and I'ved checked to
                > see if
                > its there myself. I would really appreciate it if anyone can tell me where
                > my
                > scripting error is or perhaps correcting the error for me.
                >




                • 5. Re: PHP Email Form
                  Level 7
                  What happens now when you submit it?

                  --
                  Murray --- ICQ 71997575
                  Adobe Community Expert
                  (If you *MUST* email me, don't LAUGH when you do so!)
                  ==================
                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                  ==================


                  "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
                  news:g36cb2$i78$1@forums.macromedia.com...
                  > Nice one for pointing out those errors I've made. I still can't get the
                  > damn
                  > thing to work though even with those changes. If you have a bit more
                  > advice you
                  > could share it would be much appreciated : )
                  >
                  >

                  • 6. Re: PHP Email Form
                    NVaughanUK Level 1
                    I seem to get the same usual error. If I submit the linkexchange.php when its placed in my cgi-bin folder I get the "Internal Server Error," but if I try to submit the form when the linkexchange.php is placed on my root then I get something like "page not found."

                    quote:

                    Originally posted by: Newsgroup User
                    What happens now when you submit it?

                    --
                    Murray --- ICQ 71997575
                    Adobe Community Expert
                    (If you *MUST* email me, don't LAUGH when you do so!)
                    ==================
                    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                    ==================


                    "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
                    news:g36cb2$i78$1@forums.macromedia.com...
                    > Nice one for pointing out those errors I've made. I still can't get the
                    > damn
                    > thing to work though even with those changes. If you have a bit more
                    > advice you
                    > could share it would be much appreciated : )
                    >
                    >




                    • 7. Re: PHP Email Form
                      Level 7
                      Can you post a link to the page, please?

                      --
                      Murray --- ICQ 71997575
                      Adobe Community Expert
                      (If you *MUST* email me, don't LAUGH when you do so!)
                      ==================
                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      ==================


                      "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
                      news:g36mbs$srb$1@forums.macromedia.com...
                      >I seem to get the same usual error. If I submit the linkexchange.php when
                      >its
                      > placed in my cgi-bin folder I get the "Internal Server Error," but if I
                      > try to
                      > submit the form when the linkexchange.php is placed on my root then I get
                      > something like "page not found."
                      >
                      >
                      quote:

                      Originally posted by: Newsgroup User
                      > What happens now when you submit it?
                      >
                      > --
                      > Murray --- ICQ 71997575
                      > Adobe Community Expert
                      > (If you *MUST* email me, don't LAUGH when you do so!)
                      > ==================
                      > http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      > http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      > ==================
                      >
                      >
                      > "NVaughanUK" <webforumsuser@macromedia.com> wrote in message
                      > news:g36cb2$i78$1@forums.macromedia.com...
                      > > Nice one for pointing out those errors I've made. I still can't get the
                      > > damn
                      > > thing to work though even with those changes. If you have a bit more
                      > > advice you
                      > > could share it would be much appreciated : )
                      > >
                      > >
                      >
                      >

                      >
                      >
                      >

                      • 8. Re: PHP Email Form
                        yupieyi Level 1
                        I think the server is behaving exceptionally :-(
                        • 9. Re: PHP Email Form
                          NVaughanUK Level 1
                          http://www.companyleague.co.uk/email.html

                          It's only a temporary page until I get it sorted : )
                          • 10. Re: PHP Email Form
                            Level 7


                            > http://www.companyleague.co.uk/email.html
                            >
                            > It's only a temporary page until I get it sorted : )

                            cgi-bin/linkexchange.php

                            It's not going to work with the php script in a cgi-bin folder. That folder
                            is normally for Perl cgi scripts.

                            Move the script to some other location, like put the public root of your
                            site.

                            From your previous question:
                            > but if I try to
                            >submit the form when the linkexchange.php is placed on my root then I get
                            >something like "page not found."

                            Does this happen when you submit, when it's trying to find the SCRIPT?
                            Or does it happen when the script tries to redirect to some "thank you"
                            page?

                            If that latter-

                            --
                            Alan
                            Adobe Community Expert, dreamweaver

                            http://www.adobe.com/communities/experts/



                            • 11. Re: PHP Email Form
                              NVaughanUK Level 1
                              On both occasions, whether im trying to submit the form with the linkexchange.php in my cgi-bin folder or on the root, the error happens instantly when I press submit. I've created both the linkexchange.php on the root and in cgi-bin to show you the error I receive where ever it's placed:

                              http://www.companyleague.co.uk/cgi-bin/linkexchange.php
                              http://www.companyleague.co.uk/linkexchange.php
                              • 12. Re: PHP Email Form
                                kiss4me08 Level 1
                                guys so much code i cant keep up
                                • 13. Re: PHP Email Form
                                  NVaughanUK Level 1
                                  If there's a chance of a follow up guys it would be appreciated as usual : )
                                  • 14. Re: PHP Email Form
                                    code was working properly but i found some more problem any how thank you