Jump to content

Help With Php Email Form


skippa

Recommended Posts

ok. so ive got a php email form. but i want to change it, instead of me changing the email address in the code, i would like there to be several boxes with optional emails users on my site can send a prewritten email to. is there anyway i can do this?

 

chris

Link to comment
Share on other sites

<form action="whatev.html" method="POST" />
<select name="emails" id="emails">
<option>some.email1@some.url.com</option>
<option>some.email2@some.url.com</option>
<option>some.email3@some.url.com</option>
<option>some.email4@some.url.com</option>
</select>

This way the user can select which person to email from a drop down menu.

Link to comment
Share on other sites

its difficult to explain.

 

basicly

 

Your name:                (Name box here)

email to send mail to:  (email box here)

email to send mail to:  (email box here)

email to send mail to:  (email box here)

email to send mail to:  (email box here)

Message:                  (message box here)

 

Link to comment
Share on other sites

so you want multiple input text boxes where your user can input different email addresses to send the same message?

 

well im assuming you can make the html page with the form. WHen you submit, and go to a php page do something like

<?php
$email1 = $_POST['Email1'];
$email2 = $_POST['Email2'];
//etc, make as many vars as you need
//now put these variables into an array
$email_array = array($email1, email2, etc...);
//send the emails to each
foreach($email_array as $email){
//your email script here. use $email variable as the to setting
}
?>

 

hope that helps

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.