Help for a php e-mail script

Hey all you PHP-gurus!

I have a working PHP e-mail script sending mails like this:

[php]
if(isset($_POST[‘email’])) {

// EDIT THE 2 LINES BELOW AS REQUIRED

$email_to = "[email protected]";

$email_subject = "E-Mail from app/php-script";

[/php]

Now, I’d like my users to select the recipent, and I’ve made the following:

<tr>
 <td valign="top">
  <label for="recpt">Recipent</label>
 </td>
 <td valign="top">
  <select name="recpt" id="recpt">
    <option value="[email protected]">GME</option>
    <option value="[email protected]">MPO</option>
    <option value="[email protected]">JSA</option>
  </select>
 </td> 
</tr>

Now, how do I adopt that data into my PHP-script? I’ve tried this:

[php]
$email_to = “($recpt).”;

$email_subject = "E-Mail from app/php-script";

[/php]

But, that doesn’t work :frowning:

Any help would be appreciated!

Regards
Jan

Something like

[php]if(isset($_POST[‘email’])) {

 // EDIT THE 2 LINES BELOW AS REQUIRED

 //$email_to = "[email protected]"; old stuff
   $email_to = $_POST['recpt'];

 $email_subject = "E-Mail from app/php-script";

 //set headers and send email here

}[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service