Contact Form with Email PHP not working?

Hello !
Here is a link to my contact form:
http://bayareafacepainters.com/quote_face_painting.html
Here is the tutorial I am following to set up the Form to Email PHP
http://www.freecontactform.com/email_form.php
My form is not working. It is not sending me the email, and the "Thank you for contacting us page" is not showing up either. Is this a simple fix? I am not an expert coder, any help on what I am doing wrong or missing would be helpfull!

Thank you for the suggestions... I cleaned up the names, and so I guess I am supposed to match the names in the form  to the PHP, so I changed the PHP to reflect the names of the fields in the form... it seems there may be more areas where I need to do this... What else does this need to work properly?
http://www.bayareafacepainters.com/quote_face_painting.html
<?php
if(isset($_POST['email'])) {
    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "[email protected]";
    $email_subject = "Face Painting Quote";
    function died($error) {
        // your error code can go here
        echo "We are very sorry, but there were error(s) found with the form you submitted. ";
        echo "These errors appear below.<br /><br />";
        echo $error."<br /><br />";
        echo "Please go back and fix these errors.<br /><br />";
        die();
    // validation expected data exists
    if(!isset($_POST['Name']) ||
        !isset($_POST['Email']) ||
        !isset($_POST['Phone']) ||
        !isset($_POST['Contact_Preference']) ||
        !isset($_POST['Contact_Preference']) ||
        !isset($_POST['Date']) ||
        !isset($_POST['Time']) ||
        !isset($_POST['Location']) ||
        !isset($_POST['Guests']) ||
        !isset($_POST['Age']) ||
        !isset($_POST['comments'])) {
        died('We are sorry, but there appears to be a problem with the form you submitted.');     
    $Name = $_POST['Name']; // required
    $Email = $_POST['Email']; // required
    $Phone = $_POST['Phone']; // required
    $telephone = $_POST['telephone']; // not required
    $comments = $_POST['comments']; // required
    $error_message = "";
    $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  if(!preg_match($email_exp,$email_from)) {
    $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
    $string_exp = "/^[A-Za-z .'-]+$/";
  if(!preg_match($string_exp,$first_name)) {
    $error_message .= 'The First Name you entered does not appear to be valid.<br />';
  if(!preg_match($string_exp,$last_name)) {
    $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
  if(strlen($comments) < 2) {
    $error_message .= 'The Comments you entered do not appear to be valid.<br />';
  if(strlen($error_message) > 0) {
    died($error_message);
    $email_message = "Form details below.\n\n";
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    $email_message .= "First Name: ".clean_string($first_name)."\n";
    $email_message .= "Last Name: ".clean_string($last_name)."\n";
    $email_message .= "Email: ".clean_string($email_from)."\n";
    $email_message .= "Telephone: ".clean_string($telephone)."\n";
    $email_message .= "Comments: ".clean_string($comments)."\n";
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
<!-- include your own success html here -->
Thank you for contacting us. We will be in touch with you very soon.
<?php
?>

Similar Messages

  • Contact form check boxes will not work on a Tablet

    Hi there,
    I created a website (Desktop) and a mobile version (Phone).  I did not create one for a tablet but have relied on the Desktop version if someone views it on a Tablet.
    Here's the thing, I created a contact form with checkboxes.  It works great on a desktop (because people check the boxes with their mouse), however, it doesn't work on a Tablet, when you try and check the boxes with your finger.
    Help!

    Please share the site URL.

  • Object Package with Email Notifications not working

    I have an object package with 10 reports in it.  I want Edge to send email notices to the customers when each report is ready to be viewed.  But it will only send an email for the first report not any of the others.  Any ideas on why the other notifications aren't being sent out?

    I found out this is a known issue.  The "Schedule For" option is not supported for object packages.  I worked around it by setting success and failure events and then scheduling an email to be sent when one of the events occurs.

  • Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email.  t worked, but only for those with PC.  I could not get it to work with Apple Yosemite even with reader installed .  is there a way i can make it work for apple /

    Hi - I created a form in Adobe Livecycle and have a button on it to send the form via email. It worked, but only for those with PC. However,  I could not get it to work with Apple loaded with Yosemite even with reader installed .  Is there a way i can make it work for apple / Mac? It worked fine on a mac using Mountain Lion and reader
    Thanks

    LiveCycle = XFA forms.
    afaik - These cannot be used in Apple OSs.
    Be well...

  • Contact form with attachment in flash 8

    Hi all,
    i want to send the contact form with attachment in flash 8
    using PHP....
    i have done the simple contact form and it's working
    fine...but now i want to give attachment facility in my form...
    so how can i send attachment along with my contact form.

    Seems like you want full email application capabilities from
    Flash ... :)
    But here is a good thing: you can use the FileReference class
    to download/upload files. Search the help: ActionScript
    classes/FileReference

  • ColdFusion contact form by email - please help

    Hello,
    I tried to create a contact form, using email to send, and I
    have some issues and questions:
    1. I like to have a message "Your form has been sent", but it
    shows the blank after user submited the form.
    2. If user enter her email address, this form will send to
    her email address and me, but it does not send to her email
    address.
    Can anyone please take a look at my code below?
    Why I don't get the output (result) I like to have?
    Thanks very much.
    Jenny.
    <cfif IsDefined("form.Subject")>
    <cfprocessingdirective suppresswhitespace="no">
    <cfmail subject="#form.Subject#" from="#form.From#"
    to="[email protected]" >
    This is a message from that form...
    #form.Message#
    </cfmail>
    </cfprocessingdirective>
    <cfelse>
    <cfform action="#CGI.SCRIPT_NAME#" method="post"
    name="frmName">
    name <cfinput type="text" name="Name" size="20"><br
    />
    email <cfinput type="text" name="Email"
    size="20"><br />
    Subject <cfinput type="text" name="Subject"
    size="20"><br />
    Message <textarea name="Message" cols="30" rows="3"
    ></textarea><br />
    <input type="submit" value="Submit it" />
    </cfform>
    <cfif isDefined("FORM.Name")>
    <cfmail subject="#form.Subject#" from="#form.From#"
    to="#Email#" >
    </cfif>
    <cfif isDefined("FORM.Submit")>
    <p>Your message has been sent</p>
    <cfelse>
    <cflocation addtoken="no" url="survey2.cfm">
    </cfif>

    I always start my troubleshooting with
    <cfdump var="#form#">
    <cfabort>
    You also have a problem with an cfmail tag without the
    closing tag. I'm surprised that didn't cause a crash.
    You also have some problems with your if/else logic.

  • I am having trouble with my speakers not working while online in particular on windows.My audio works when playing audio files

    I am having trouble with my speakers not working while online particular on facebook. My audio works when playing audio files.

    Hi,
    Did it happen all the time or sometime?
    Please check online browser status:
    Click Volume icon in the taskbar, click Mixer link button as below:
    If it's fine, follow this guide to run troubleshooter to detect and fix the issue:
    Tips for fixing common sound problems
    http://windows.microsoft.com/en-in/windows/tips-fixing-common-sound-problems#tips-fixing-common-sound-problems=windows-7
    Meanwhile, this similar thread also could be referred:
    https://social.technet.microsoft.com/forums/ie/en-US/a4a1cfe5-93a5-4c0b-9bf6-f7db0304f2ba/no-sound-on-youtube-or-any-other-webpage
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • I have been looking everywhere on how to code a contact form with as3

    I wouldn't think it is such an uncommon thing, but I have been unable to find tutorials past flash 5, or as2, on how to code contact forms.
    I have a simple movieclip symbol, with text fields, all with instance names, and need to find out how to pass the information from flash to a php
    script.  If anyone can help, or atleast point me towards a tutorial that uses something newer than flash 5 and newer than 2004, it would be awesome.

    Would any of these work?
    http://www.webdesignmo.com/blog/2008/08/14/flash-contact-form-in-actionscript-3/
    check this one first:
    http://www.kirupa.com/forum/showthread.php?t=272898
    http://www.edesignerz.net/flash/527--flash-cs3-as3-contact-form-with-php-parser-actionscri pt-3-video-tutorial
    Hope this helps!

  • Hello everybody,i've forgot my apple password and i wanted to reset it to a new one but i also forgot the security question and the alternative email does not work and i am really need to log in to my apple i d because my iPhone 4g won't  let me access it

    Hello everybody,i've forgot my apple password and i wanted to reset it to a new one but i also forgot the security question and the alternative email does not work and i am really need to log in to my apple i d because my iPhone 4g won't  let me access it so anyone can help me with it or can i put another apple id to it without putting the first password?THANKS FOR YOUR HELP.

    Then call AppleCare and talk to someone in account security.

  • InDesign Buttons and Forms... Not Working

    Hello Guys,
    I'm using Adobe InDesogn CC 10.1.0.70 x64 Build, the problem is with the check box option from Buttons and Forms, They are, simply, not working... I'm trying to add a check box on my pdf I'm creating in InDesign.. I'm using checkbox from "Sample Buttons and forms".. but nothing is working.. I'm just dragging the Check Box samp and drop it in my canvas, exporting it as PDF with "Hyperlinks" checked.. and Interactive Elemnts with Include Appearance chosen but the check box doesn't having any action!! I don't know what I should do to make this work please help  

    Start by restoring your InDesign preferences:
    Trash, Replace, Reset, or Restore the application Preferences

  • VERY URGENT - Adobe forms with email problems

    I THERE - I AM A ADOBE FORMCENTRAL CLIENT I HAVE MY PAYEMENTS ON DAY BUT FOR SOME REASON THE ADOBE STOP RESENDING TO MY EMAUIL ACOUNT AND TO MY CLIENTS  EMAIL ACCOUNT THE SUMARY OF THE FORM THAT IS SUBMITED. THIS IS VERY URGENT THAT BE FIXED FROM YOU SIDE PLS LET ME KNOW WHAT IS HAPENING.
    PLS FIX THIS URGENT AS I HAVE MY CLIENTS SCREEMING ON ME
    PLS ANSWER TO
    [email protected]

    Now is working
    after 2 hours is working now. but this have never hapen before. now I am
    woried with this ADOBE FORM system!!!! it can hapen and I never know.
    br
    henrique
    2014-04-25 21:29 GMT+01:00 Josh_Corey <[email protected]>:
        Re: VERY URGENT - Adobe forms with email problems
    created by Josh_Corey <http://forums.adobe.com/people/Josh_Corey> in
    FormsCentral - View the full discussion<http://forums.adobe.com/message/6331228#6331228

  • Serial number provided with download does not work, now what?

    serial number provided with download does not work, now what?

    Chrish29593217 you are welcome to contact our directly at Contact Customer Care.  What Adobe software title are you facing difficulties with?

  • TS3276 my server went down and now my email is not working, can anyone help please?

    My website server went down and now my email is not working (though the server is back up)
    Does anyone know what I need to do?
    I'm told by my website hosts that I need to 'reconfigure authentication" but I have no idea how to do this, they are now closed for the weekend and I need it fixed before Monday morning. Could anyone tell me where to find step by step instructions. I've tried but have made matters worse and the couple of mail accounts that WERE still receiving email are now also not.
    Help please!

    Hi Eyen80,
    If you are having issues with your iPhone’s camera not functioning, you may want to troubleshoot using the steps in this article -
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/TS2802
    Specifically -
    Camera isn't functioning or has undesired image quality
    If the screen shows a closed lens or black image, force quit the Camera app.
    If you do not see the Camera app on the Home screen, try searching for it in Spotlight. If the camera does not show up in the search, check to make sure that Restrictions are not turned on by tappingSettings > General > Restrictions.
    Ensure the camera lens is clean and free from any obstructions. Use a microfiber polishing cloth to clean the lens.
    Cases can interfere with the camera and the flash. Try gently cleaning the lens with a clean dry cloth or removing the case if you see image or color-quality issues with photos.
    Try turning iPhone off and then back on.
    Tap to focus the camera on the subject. The image may pulse or briefly go in and out of focus as it adjusts.
    Try to remain steady while focusing:
    Still images: Remain steady while taking the picture. If you move too far in any direction, the camera automatically refocuses to the center.
    Note: If you take a picture with iPhone turned sideways, it is automatically saved in landscape orientation.
    Video: Adjust focus before you begin recording. You can also tap to readjust focus while recording. Exiting the Camera application while recording will stop recording and will save the video to the Camera Roll.
    Note: Video-recording features are not available on original iPhone or iPhone 3G.
    If your iPhone has a front and rear camera, try switching between them to verify if the issue persists on both.
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • [svn] 4323: Bug: LCDS-544 - Scenario where two components have seperate channel sets with overlapping channels not working .

    Revision: 4323
    Author: [email protected]
    Date: 2008-12-15 19:23:10 -0800 (Mon, 15 Dec 2008)
    Log Message:
    Bug: LCDS-544 - Scenario where two components have seperate channel sets with overlapping channels not working.
    QA: Yes
    Doc: No
    Checkintests Pass: Yes
    Details:
    * Hunting to a new channel within a channelset never triggered a disconnect from the previous channel(s). This isn't a problem in general, but does becomes a problem when an app defines two distinct channelsets containing at least one shared channel at the head of the list. In this case, the first channelset hunts past it and connects on a later channel. But when the second channelset hunts through (triggering a connect fault when it hits that initial shared channel that can't connect), the fault is processed by the first channelset as well (incorrectly).
    Ticket Links:
    http://bugs.adobe.com/jira/browse/LCDS-544
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as

    Running the script by python2 solves it for me:
    su - mythtv -c "nice -n 19 python2 /usr/bin/tv_grab_nl_py --output ~/listings.xml"
    Best regards,
    Cedric

  • Form with key 2 not present (create organization)

    On a brand new installation of OIM 9.1.0.1, after logon as xelsysadm, I try Organization - Create but I get the following error:
    2010-02-18 10:30:57,478 ERROR [XELLERATE.APIS] Class/Method: tcFormDefinitionOperationsBean/getFormFieldsData encounter some problems: Form with key 2 not present
    2010-02-18 10:30:57,478 ERROR [XELLERATE.WEBAPP] Class/Method: tcManageOrganizationAction/prepareNewOrganization encounter some problems: {1}
    Thor.API.Exceptions.tcFormNotFoundException
         at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.getFormFieldsData(Unknown Source)
         at com.thortech.xl.ejb.beansimpl.tcFormDefinitionOperationsBean.getFormFields(Unknown Source)
         at com.thortech.xl.ejb.beans.tcFormDefinitionOperationsSession.getFormFields(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
         at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
         at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
         at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
         at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
         at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
         at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
         at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
         at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
         at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
         at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
         at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
         at org.jboss.ejb.Container.invoke(Container.java:960)
         at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
         at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
         at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
         at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
         at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
         at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
         at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
         at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
         at $Proxy623.getFormFields(Unknown Source)
         at Thor.API.Operations.tcFormDefinitionOperationsClient.getFormFields(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor173.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at Thor.API.Security.LoginHandler.jbossLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy790.getFormFields(Unknown Source)
         at com.thortech.xl.webclient.actions.tcManageOrganizationAction.setFormFields(Unknown Source)
         at com.thortech.xl.webclient.actions.tcManageOrganizationAction.prepareNewOrganization(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
         at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
         at java.lang.Thread.run(Thread.java:619)
    2010-02-18 10:30:57,946 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask
    2010-02-18 10:30:57,946 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, PassivatedCount=0
    2010-02-18 10:30:57,946 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] removePassivated, now=1266485457946, maxLifeAfterPassivation=1200000
    2010-02-18 10:30:57,946 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] RemoverTask, done

    The database 11g release 2 is the problem.
    Solution: install Oracle database 11.1.0.6.

Maybe you are looking for