Jump to content

artstarved

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

artstarved's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks alot, its working awesome now!
  2. Thanks for the quick reply. I am understanding what you are saying, as it is right now the code sends the email back to address that you input. I have tried adding: <?php $to = $_POST['recipent@mail.com']; $name = $_POST['name']; $email = $_POST['email']; $web = $_POST['web']; $body = $_POST['text']; if (!empty($name) & !empty($email) && !empty($body)) { $body = "Name:{$name}\n\nWebsite :{$web}\n\nComments:{$body}"; $send = mail($email, 'Contact Form Submission', $body, "From: {$email}"); if ($send) { echo 'true'; //if everything is ok,always return true , else ajax submission won't work } } ?> But this doesn't fix the problem. It still behaves the same way. Then I tried this: <?php $to = "recipent@mail.com"; $name = $_POST['name']; $email = $_POST['email']; $web = $_POST['web']; $body = $_POST['text']; if (!empty($name) & !empty($email) && !empty($body)) { $body = "Name:{$name}\n\nWebsite :{$web}\n\nComments:{$body}"; $send = mail($email, 'Contact Form Submission', $body, "From: {$email}"); if ($send) { echo 'true'; //if everything is ok,always return true , else ajax submission won't work } } ?> But this doesn't fix the problem. It still behaves the same way. Lastly I tried what you just suggested: <?php $name = $_POST['name']; $email = $_POST['recipent@mail.com']; $web = $_POST['web']; $body = $_POST['text']; if (!empty($name) & !empty($email) && !empty($body)) { $body = "Name:{$name}\n\nWebsite :{$web}\n\nComments:{$body}"; $send = mail($email, 'Contact Form Submission', $body, "From: {$email}"); if ($send) { echo 'true'; //if everything is ok,always return true , else ajax submission won't work } } ?> This just breaks the function all together and it won't send the email all or complete the script. I feel like this is a no-brainer for someone who actually knows and uses PHP regularly. Any other ideas?
  3. I'm sorry, that is not very clear. Basically there is now way to define a recipient for this email once it builds. That way when the script is executing the email does not actually send to anywhere(any specified email address). Any idea of how I might define a recipient and get this email to send?
  4. Seriously, any help or even a point in the right direction would be appreciated. Thanks!
  5. Hey there, I was using this CSS 3 and jQuery form tutorial to build a form for my website. http://youhack.me/2010/07/22/create-a-fancy-contact-form-with-css-3-and-jquery/ (the PHP is near the bottom) It uses Ajax and Php to do the backend of the form, but in the tutorial there is not a $to. The form doesn't work because it has nowhere to go. Can someone please help me modify this code 'so I can include a send to email address: <?php $name = $_POST['name']; $email = $_POST['email']; $web = $_POST['web']; $body = $_POST['text']; if (!empty($name) & !empty($email) && !empty($body)) { $body = "Name:{$name}\n\nWebsite :{$web}\n\nComments:{$body}"; $send = mail($email, 'Contact Form Submission', $body, "From: {$email}"); if ($send) { echo 'true'; //if everything is ok,always return true , else ajax submission won't work } } ?>
  6. I am trying to format this code so that it does not dump all of the text from different inputs into one garbled mess in the e-mail message. To do this I am trying to use html to add a header and line break so that the emails is formatted but it is just spitting my html out like it is plain text when I open the e-mail. Tags and all. If anyone can help that would be great, I am pretty new to PHP. Here is my PHP: <?php //Organization Name $mail_from="$organization"; //Organization Telephone $message.="$organization_phone"; //Organization Mail $message.="$organization_mail"; //General Inquiries $message.="$general_inquires"; // From $header="from: $organization <$mail_from>"; // Enter your email address $to ='dealers@countrydelights.ca'; // Variables $message.=$var1.'<p>organization phone number</p><br>'.$var2.'<p>organization email</p><br>'.$var3.'<p>general inquiries</p><br>'; // Send Form $send_contact=mail($to,$subject,$message,$header); // Check, if message sent to your email // display message "We've recived your information" if($send_contact){ echo "We've recived your contact information"; } else { echo "ERROR"; } ?>
×
×
  • 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.