Jump to content

Please help (I didn't find any good title describing it)


dancojocaru2000

Recommended Posts

I want to make an email form using PHP. Everything is good, BUT

Is there a way to make a drop-down list and if the visitor selects Admin, email will be sent to admin@$_SERVER[DOCUMENTROOT] and if it selects Postmaster it will be sent to postmaster@<that thing>?

something like this

<form method="POST" action="page.php">
Mail: 
<select name="mail">
<option value="admin@yourdomain">Admin</option>
<option value="postmaster@yourdomain">Post Master</option>
</select>
<input type="submit" name="submit" />
</form> 

if (isset($_POST['submit']))
{
    $mail = $_POST['mail'];

    // send mail
}

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.