Give help. Get help.

  • # January 15, 2009 at 10:07 pm

    Hi I’m getting blank email messages from a contact form I set up on a site. Completely blank. I’m using PHP to run it. Here’s an example of what I get:

    From: [email]
    Sent: Thursday, January 15, 2009 8:00 AM
    To: [email]
    Subject: Contact Form Submission


    It never happened before, but now I’m getting 2-3 of these a day. Can anyone help? Do I need to ask one of those "what’s 2+2" questions?

    How would I do that?

    Any help is much appreciated.

    # January 23, 2009 at 2:12 am

    Thanks for the response guys! I’m still having trouble. Okay, I’m a rookie here. Sry…

    Here’s the site I’m working on.

    Here is the PHP:

    < ?php // CHANGE THE THREE VARIABLES BELOW $EmailFrom = ""; $EmailTo = ""; $Subject = "Contact Form Submission"; $Name = Trim(stripslashes($_POST['Name'])); $Location = Trim(stripslashes($_POST['Location'])); $Email = Trim(stripslashes($_POST['Email'])); $Message = Trim(stripslashes($_POST['Message'])); // prepare email body text $Body = ""; $Body .= "Name: "; $Body .= $Name; $Body .= "n"; $Body .= "Location: "; $Body .= $Location; $Body .= "n"; $Body .= "Email: "; $Body .= $Email; $Body .= "n"; $Body .= "Message: "; $Body .= $Message; $Body .= "n"; // send email $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>“);

    // redirect to success page
    if ($success){
    print ““;
    print ““;

    I’m so sorry if I’m really missing something here, but I don’t know how to fix this my self.

    How do I validate? Any help is much appreciated!

    Chris, I tried using your example on your screencast. Did I miss something?

    # January 24, 2009 at 4:53 pm

    Dude! You are the best!! I’m starting to understand the way this works. I’m not PHP literate yet, but your help has been an awesome resource!

    I did encounter something odd with the code you provided though and I’ve been trying to fix it.

    Seems like the new mail function is sending the thank you email to the "MAILTO" and not from the person who made contact on the web page. Any idea what I’m missing here.

    Again, I really appreciate all your help. I also just got myself a premium subscription so I’ll be on my way to learning PHP. :D

    # January 25, 2009 at 2:31 pm


    Thanks dude! You’re the best. Your post really helped out and it seems like the spam has stopped.

    Yes, I have on there because I built the site for my mother in law and she wanted to use her regular e-mail and not a one…

    I tested it out and seems to be working fine.

    Again, thank you soooo much!


    # January 26, 2009 at 12:24 am

    Yea, I asked and she has it all set up with her personal account. She’s a local artist who just wants something up and running. Guess it doesn’t bother her much. What ever the client wants, right? ;)

    I’m really happy with the contact form and am happy you helped me with the PHP!

    I’m off to to keep learning more and more about web design/development.

    Again, thank you very much for your help! You’re the best!!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.