Emailer Submission Form Not Working

Good Morning All,

I’ve been having issues trying to finish this submission form for a friend’s company. I used to use this about a year a go for another company, so I used a former file as a foundation to try and set this one up for a marketplace.

The problem is that whenever I test it, once I upload to the FTP; after I fill everything out instead of it sending to my email, it gives me an error message.

I have the css spry-assets folders, so it isn’t that.

I have tried attached the coding below - if anyone has the time, I would gratefully appreciate the help.

Thank you so much for your time!

[php]

<?php $hideThanks = ''; //Grab all the variables from the POST headers if ($_POST['button'] == 'Submit') { $body = ''; foreach($_POST as $name => $value) { $body .= "$name : $value\n"; } $to = "[email protected]"; if($_POST['Department']){ $dept = $_POST['Department']; }else{ $dept = 'No Dept Specified'; } $subject = "Contact Inquiry (" . $dept . ")"; //$body = "From: " . $name_field . "\n E-Mail: " . $email_field . "\n Message:" . $message . "\n"; if (mail($to, $subject, $body)) { $hideThanks = '


' . 'Thank you for registering for our event. We will be in touch with you shortly.

' . 'Click here to return ' . 'to the home page

'; } else { $hideThanks = '


' . 'There appears to be an error with our contact, please contact us by phone or e-mail at your convenience.

'; } }//end forum submit check ?> iMaker Application | Century Marketplace


</div></td>
<td></td>
        <tr>
          <td valign="top" bgcolor="#FFFFFF">
              <?php echo $hideThanks; ?>
                
              <p align="left">
              <p align="left"><img src="http://www.wb-3d.com/wp-content/uploads/2010/03/seize-opportunity-events/mailer-registration-page.jpg"><span class="style23"><br />
                </span><br />




Please enter your name:

              <label>
              <select name="Sur" id="select">
                <option value="Mr." selected="selected">Mr.</option>
                <option value="Ms.">Ms.</option>
                <option value="Mrs.">Mrs.</option>
                <option value="Dr.">Dr.</option>
              </select>
              </label>
            </p>
            
          
            <p align="left"><span class="style9"> First Name:</span>                  <span id="sprytextfield3">
              <label>
              <input type="text" name="firstname" id="firstname" />
              </label>
              <span class="textfieldRequiredMsg">Please enter your first name.</span></span><br />
              <br />
              <span class="style9">Last Name:</span>                  <span id="lastname">
              <label>
              <input type="text" name="lastname" id="lastname" />
              </label>
              <span class="textfieldRequiredMsg">Please enter your last name.</span></span>
              <p align="left"><span class="style9">Email Address: </span><span id="sprytextfield4">
              <label>
              <input type="text" name="email" id="email" />
              </label>
              <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Please enter a valid email address.</span></span>                  
              <p align="left"><span class="style9">Phone Number:</span><span id="sprytextfield6">
              <label>
              <input type="text" name="phone" id="phone" />
              </label>
              <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Please enter a valid phone number.</span></span>
                <br />
                <span class="style17 style13">ex. (000) 000-0000</span><br />
                <p align="left">
                  <label><span class="style9">Company:
                  <input type="text" name="Company" id="Company" />
                  </span></label>
                   <label><span class="style9">Address:
                  <input type="text" name="Address" id="Address" />
                  </span></label><br /><br />
                  <label><span class="style9">City:
                  <input type="text" name="City" id="City" />
                  </span></label><label><span class="style9">State:
                  <input type="text" name="State" id="State" />
                  </span></label><br /><br />
                  <label><span class="style9">Zip Code:
                  <input type="text" name="Zip Code" id="Zip Code" />
                  </span></label>
                  </p><BR />
                  
                <p align="left"><strong class="style8">Best form of contact:</strong><br />
                <label></label>
                  <label>
                  <input type="checkbox" name="BestFormContactEmail" id="checkbox19" />
                  </label>
                  <span class="style9">Email<br />
                  <label>
                  <input type="checkbox" name="BestFormContactPhone" id="checkbox20" />
                  </label>
              Phone</span>
              
               <p align="left"><span class="style8">Website or URL where pictures of your items can be found:</span><br />
                <label>
                  <textarea name="Website or URL of pictures" id="textarea" cols="45" rows="5"></textarea>
                </label><br /><span class="style9">If you don't have a website, please send 3 pictures in .jpg format with the subject<br /><b>'Re: iMaker Application Images'</b> and <b>your contact info</b> to <a href="mailto:[email protected]">[email protected]</a></span>
              
              <p align="left"><span class="style8">What type of items are you interesting in selling?</span></strong><br />
                <label>
                  <textarea name="Items Interested in selling" id="textarea" cols="45" rows="5"></textarea>
                </label><span class="style9"><br />(ex. Indie Crafts, Handmade Jewelry, Antique Furniture, Baked Goods, Photography, etc.)</span>

What kind of space do you prefer?
Kiosk (12' x 14')

              <input name="SPACE PREFERRED REG:Interested in KIOSK W ELECTRICITY" type="checkbox" value="yes" /><span class="style9">Kiosk w/ Electricity</span></span><span class="style1 style4"><span class="style9"><br />
              
              <input name="SPACE PREFERRED REG:Interested in SMALL INDOOR SPACE 6'x 8'" type="checkbox" value="yes" /></span></span><span class="style20"><span class="style9">Small Indoor Space (6' x 8')<br />
              
              <input name="SPACE PREFERRED REG:Interested in LARGE INDOOR SPACE" type="checkbox" value="yes" />Large Indoor Space (8' x 10')<br />
              
              <input name="TRAINING CLASS REG:Interested in LARGE INDOOR WITH ELECTRICITY" type="checkbox" value="yes" />Large Indoor w/ Electricity </span></span>
                </p>

How did you find out about iMake 2011?



 


 

 



      </table></td>
    </tr>
  </table>
</div></td>
<td></td>
[/php]

Hi there,

After going through your code, I can’t for the life of me find your tags that allow the form to be submitted. Once you add the form tags and point the script back to itself it should work.

Are you serious?

You are using title tag without head tag,
you use div between tr tag,
You use tr without table tag,
You can’t use
You open but don’t close it…

You should be thankful that the system displays something, because that code is completely wrong

Sponsor our Newsletter | Privacy Policy | Terms of Service