Jump to content

Search the Community

Showing results for tags 'enquiry'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi Guys, I'm no expert with this but I have the code below to fill in an enquiry form & send an E-mail but its not working. Only two fields are required (the name & E-mail address) but each time I get the error message 'There was a problem with sending the form. Please check to ensure you have filled in all the fields.' Everything I try & change I cannot get it to work, - any ideas? <?php $SENT = false; if ($_POST && $_POST["name"] && eregi("^[a-zA-Z0-9 ]+$", $_POST["name"]) && $_POST["email"] && eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST["email"])) { $recipient = "me@mydomain.com"; $recipient = "enquiries@mydomain.com"; $subject = "Enquiry from the Website"; $email_header = "From: " .$_POST["email"]. " (" .$_POST["name"]. ")\r\n"; "Reply-To: " .$_POST["email"]. ""; // build the email $s = "The following contact form has been submitted:\n\n"; $s .= "=== Customer Details =====\n"; $s .= "Name: " .$_POST["name"]. "\n"; $s .= "Company: " .$_POST["company"]. "\n"; $s .= "Telephone: " .$_POST["telephone"]. "\n"; $s .= "Email Address: " .$_POST["email"]. "\n\n"; $s .= "=== Enquiry Information =====\n"; $s .= trim($_POST["comments"])."\n\n"; $s.= "Generated: " .date("Y-m-d H:i:s"); $email = wordwrap($s, 72). "\n\n\n"; // wrap text to 72 characters if (@mail($recipient, $subject, $email, $email_header)) { $SENT = true; } else { $SENT = false; } } ?> \\Rest of HTML code here... <? if (!$SENT) { ?> <? if (!$SENT && $_POST) { ?> <p class="red">There was a problem with sending the form.<br />Please check to ensure you have filled in all the fields.</p> <? } ?> <p><b>Enquiry Form</b><br /> <span class="red">**</span> Indicates required fields</p> <form name="contact" action="contact.php" method="post"> <fieldset class="conform"> <legend>Your Details</legend><br /> <label for="name">Name</label> <input id="name" type="text" size="40" value="<?php echo (isset($_POST["name"])) ? $_POST["name"] : '' ; ?>" name="name" /> <span class="red">**</span><br /> <label for="company">Company</label> <input id="company" type="text" size="40" value="<?php echo (isset($_POST["company"])) ? $_POST["company"] : '' ; ?>" name="company" /><br /> <label for="telephone">Telephone</label> <input id="telephone" type="text" size="40" value="<?php echo (isset($_POST["telephone"])) ? $_POST["telephone"] : ''; ?>" name="telephone" /><br /> <label for="email">Email Address</label> <input id="email" type="text" size="40" value="<?php echo (isset($_POST["email"])) ? $_POST["email"] : ''; ?>" name="email" /> <span class="red">**</span><br /> </fieldset> <fieldset class="conform2"> <legend>Further Information</legend><br /> <textarea id="comments" name="comments" size="40" rows="8" cols="50"><?php echo(isset($_POST["comments"])) ? $_POST["comments"] : '' ; ?></textarea> </fieldset> <br /> <a href="javascript:document.contact.submit();"><img title="" height="43" alt="" src="images/submit.gif" width="102" border="0" /></a> </form> </div> <? } else { ?> <p>Thank you for your enquiry. We will reply as soon as possible.</p> <? } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.