Jump to content

Help With Php Email Form


skippa

Recommended Posts

<form action="whatev.html" method="POST" />
<select name="emails" id="emails">
<option>[email protected]</option>
<option>[email protected]</option>
<option>[email protected]</option>
<option>[email protected]</option>
</select>

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

I'm not sure exactly what you mean, but perhaps this would work. Create a text box and tell users to enter the email addresses in it seperated by a comma. Then run explode() (http://us3.php.net/explode). Use the comma as a delimiter and it will create an array containing all the email addresses the user entered.

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)

 

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

Archived

This topic is now archived and is closed to further replies.

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