7 Replies Latest reply on Aug 3, 2011 3:16 PM by the_shocker

    My Web Form Doesn't Work

    karina1717

      Can someone tell me why this web form doesn't work?

       

      http://www.angelsjunkremoval.com/contact.html

        • 1. Re: My Web Form Doesn't Work
          Level 4

          Can you tell someone what "doesn't work" means?

           

          The action of the form is to the same .html page. .html is unable to process server scripting. That's probably one of the reasons why the form "doesn't work".

           

          best,

          Shocker

          • 2. Re: My Web Form Doesn't Work
            karina1717 Level 1

            It will now post but the email and first and last name information does not post.

            • 3. Re: My Web Form Doesn't Work
              Level 4

              karina1717 wrote:

               

              It will now post but the email and first and last name information does not post.

              Fantastic! Unfortunately http://www.angelsjunkremoval.com/contactprocess.php is a server side processing script. As you well know, server side processing scripts are processed on the server. No surprise there, but what is surprising is that despite knowing that fact you failed to provide your processing script in this discussion. Unless we're looking at your script over your shoulder or reading your mind no one will know what your processing script entails. How do you expect to recieve support with your issue if no one can see what your issue may be?

               

              best,

              Shocker

              • 5. Re: My Web Form Doesn't Work
                karina1717 Level 1

                 

                Hopefully it will enter the code o this seconc try

                • 6. Re: My Web Form Doesn't Work
                  karina1717 Level 1

                  <?php

                   

                  /* Subject and Email Variables */

                   

                  $emailSubject = 'Contact Query';

                  $webMaster = 'patm@angelsjunkremoval.com';

                   

                  /* Gathering Data Variables */

                   

                  $email2Field = $_POST['email2'];

                  $topic2Field = $_POST['topic2'];

                  $firstname2Field = $_POST['firstname2'];

                  $lastname2Field = $_POST['lastname2'];

                  $message2Field = $_POST['message2'];

                   

                  $body = <<<EOD

                  <br><hr><br>

                  Email: $email2Field <br>

                  Topic: $topic2Field <br>

                  First Name: $firstname2Field <br>

                  Last Name: $lastname2Field <br>

                  Comments: $message2Field <br>

                  EOD;

                   

                  $headers = "From: $email\r\n";

                  $headers .= "Content-type: text/html\r\n";

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

                   

                  /* Results Rendered as HTML */

                   

                  $theResults = <<<EOD

                  <html>

                  <head>

                  <title>Thanks for Contacting Us</title>

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

                  <style type="text/css">

                  <!--

                  body {

                  background-color: #f1f1f1;

                  font-family: Verdana, Arial, Helvetica, sans-serif;

                  font-size: 12px;

                  font-style: normal;

                  line-height: normal;

                  font-weight: normal;

                  color: #666666;

                  text-decoration: none;

                  }

                  -->

                  </style>

                  </head>

                   

                  <div>

                    <div align="left">Thank you for your interest! Your query will be answered very soon!</div>

                  </div>

                  </body>

                  </html>

                  EOD;

                  echo "$theResults";

                   

                   

                  ?>

                  • 7. Re: My Web Form Doesn't Work
                    Level 4

                    Ok, let's analyze the situation.

                     

                    So you say email, first name, and last name do not send through the form. Let's cross reference one of those form fields against a form field that does get sent to email then.

                     

                    Compare the email field to your message field:

                     

                    <input type="text" name="email" id="email2" />
                    
                    <textarea name="message2" id="message2" cols="45" rows="5"></textarea>
                    

                     

                    Now look at your form processing script where the field values are defined as variables:

                     

                    $email2Field = $_POST['email2'];
                    $message2Field = $_POST['message2'];
                    

                     

                    Besides one being textarea and one being type="text" what is the differnce between the two comparisons in relation to the values that are defined as variables in the processing script? The answer to this question is your solution.

                     

                    best,

                    Shocker