Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

emailing with php and mysql

New Here ,
Oct 07, 2012 Oct 07, 2012

I want a visitor to my site to click on a mysql field to send an email with a Bcc to myself also I want the link to show "Send an email" not the email address from the field

TOPICS
Server side applications
569
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Oct 07, 2012 Oct 07, 2012

MySQL is not needed for this. Below I have included all the PHP code necessary for a simple email. You just create an HTML form and include the appropriate fields. So if the form posts to itself, the code goes in a block that is run after post, using "if ($_POST['submit']){ send the email }.

One thing you should do is validate the POST before processing it.

$from="FROM: $visitor_email";

$email_subject="Message from website";

$email_body = "

Name: $name\n

Phone: $phone\n

Email: $email\n

Message: $note\n

";

mail ("$email_public", "$email_subject", "$email_body", "$from");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 07, 2012 Oct 07, 2012
LATEST

Please do not post the same question in more than one forum. I'm locking this thread. All follow-up should be in http://forums.adobe.com/thread/1078310.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines