zero-perfoliate
zero-perfoliate

Author Topic: PHP Submit Form HELP  (Read 189 times)

Offline Loren

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
PHP Submit Form HELP
« on: May 30, 2010, 01:43:44 PM »
I have been struggling with this script for the past 5 days now and I need some serious help. The information gathered does not go to the receipient address nor does the form echo out.

Can anyone help me? Thanks in advance

<?php

if (!isset($_POST['submit'])) { // if page is not submitted to itself echo the form
?>



<h5>Vairalbe Information to be Embossed</h5>

<form id="frm_message" name="frm_message" method="post" action="<?php echo $PHP_SELF;?>">

<fieldset>
<input type="hidden" name="subject" value="Varialbe Information to be Embosssed" />

      <ul>
              <li>

            <label class="description" for="Subject">Subject: </label>
            
          Vairalbe Information to be Embossed </li>      
         <li>

            <label class="description" for="Company">Company: </label>
            
               <input name="Name" id="company" type="text" size="45" class="element text" value="" />
               
            

         </li>

         <li>
            <label class="description" for="contactPerson">Contact Person: </label>
         
               <input name="contact" id="contact" type="text" size="45" class="element text" value="" />
      


         </li>
            <li>
            <label class="description" for="phoneNumber">Phone Number: </label>
         
               <input name="phone" id="phone" type="text" size="25" class="element text" value="" />
      


         </li>

         <li>
            <label class="description" for="email">Email: <span class="required">*</span></label>
            
               <input name="email" id="email" type="text" class="element text" size="45" value="" />
   <p class="error hidden" id="err_email"></p>
         </li>
    
         <li>
         

            <label class="description" for="line1">Line 1: </label>
            
               <input name="line1" id="line1" type="text" size="25" maxlength="25" class="element text" value="" />
               
            

         </li>

         <li>
            <label class="description" for="line2">Line 2: </label>
         
               <input name="line2" id="line2" type="text" size="25" class="element text" maxlength="25" value="" />
      


         </li>
            <li>
            <label class="description" for="line3">Line 3: </label>
         
               <input name="line3" id="Line3" type="text" size="25" class="element text" maxlength="25" value="" />
      


         </li>

         <li>
            <label class="description" for="Line4">Line 4: </label>
            
               <input name="line4" id="line4" type="text" class="element text" size="25" maxlength="25"  value="" />
   
         </li>
            <li>
            <label class="description" for="Line5">Line 5: </label>
            
               <input name="line5" id="line4" type="text" class="element text" size="25" maxlength="25" value="" />
   
         </li>
          </ul>       
</fieldset>

<fieldset>
  <ul>
   

   
    <li>
 <input name="Submit" type="submit" value="Submit" />
 
 
 
     
    </li>
  </ul>
</fieldset>

</form>


<?
      } else {
      error_reporting(0);
     $Subject = $_POST["Subject"];
$Name = $_POST["Name"];
$contact = $_POST["contact"];
$phone = $_POST["phone"];
$email = $_POST["email"];
$line1 = $_POST["line1"];
$line2 = $_POST["line2"];
$line3 = $_POST["line3"];
$line4 = $_POST["line4"];
$line5 = $_POST["line5"];
$recipient = 'lorenwtaylor@gmail.com';
      if (mail($recipient, $subject, $Name, $contact, $phone, $line1, $line2, $line3, $line4, $line5))
         echo nl2br("Message Sent:
         To: $recipient
         Subject: $subject
         );
      else
         echo "Message failed to send";
}
?>